Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contains keyword not correctly parsed in composite statements #6993

Open
james-whiteside opened this issue Feb 28, 2024 · 2 comments
Open

contains keyword not correctly parsed in composite statements #6993

james-whiteside opened this issue Feb 28, 2024 · 2 comments

Comments

@james-whiteside
Copy link
Member

Description

The following query is not correctly parsed, throwing TQL03:

match
$n isa name, contains "hello";
get;

The following is:

match
$n isa name;
$n contains "hello";
get;

Environment

  1. TypeDB distribution: Core
  2. TypeDB version: 2.25.7
  3. Environment: MacOS
  4. Client and version: Studio 2.25.0
@dmitrii-ubskii
Copy link
Member

Currently the expected syntax is this:

match
$n contains "hello" isa name;
get;

Which follows the structure of <variable> [<predicate>] [isa <type>];, e.g. $n "Jimbob" isa name; or $a >= 18 isa age;

@james-whiteside
Copy link
Member Author

james-whiteside commented Feb 28, 2024

I don't think this is consistent or intutitive. Currently, all of our constraint forming predicates can be chained into composite statements in the style <type>|<variable> <predicate> <type>|<variable> [, <predicate> <type>|<variable> ...]. This one is the exception to the rule.

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

No branches or pull requests

2 participants