Skip to content

struct basic tests - #428

Draft
dmitrii-ubskii wants to merge 4 commits into
typedb:feature/structsfrom
dmitrii-ubskii:structs
Draft

struct basic tests#428
dmitrii-ubskii wants to merge 4 commits into
typedb:feature/structsfrom
dmitrii-ubskii:structs

Conversation

@dmitrii-ubskii

Copy link
Copy Markdown
Member

Usage and product changes

Implementation

# file, You can obtain one at https://mozilla.org/MPL/2.0/.

#noinspection CucumberUndefinedStep
Feature: TypeQL Query with Expressions

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Comment thread query/language/struct.feature Outdated
Comment on lines +19 to +20
struct my-struct:
my-field value string;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: is there any way at all this could be ambigious with what follows next in the schema?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm yes.

define
attribute name;
struct s:
  field value string;
name value string;

Comment thread query/language/struct.feature Outdated
Comment thread query/language/struct.feature Outdated
Comment thread query/language/struct.feature Outdated
| attr:my-struct-attr:my-struct { my-field: "hello" } | value:struct:my-struct { my-field: "world" } | value:string:hello | value:string:world |


Scenario: A field of an inner struct can be accessed directly

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yess was about to comment on nesting! Maybe worth defining explicit test about nesting structs and assigning using the attribute value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants