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

Allow binding of ownerships to anonymous variables in query patterns #279

Open
james-whiteside opened this issue May 3, 2023 · 0 comments

Comments

@james-whiteside
Copy link

Problem to Solve

Currently, the query:

match
$p isa person, has name;

makes logical sense but is not valid syntax. This represents a request for all people who have a name, without binding that name.

Current Workaround

This query can already be equivalently executed with the syntax:

match
$p isa person, has name $n;
get $p;

but in general the way get changes the answer set has led to confusion for some users, plus the currently invalid syntax is more readable and intuitive.

Proposed Solution

Allow syntax of the form:

match
$t isa thing, has attribute;

as shorthand for:

match
$t isa thing, has attribute $a;
get $t;

Additional Information

This might not be possible if it leads to ambiguity in how a query could be interpreted by the parser, and so needs some thorough consideration first.

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

1 participant