You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Corrently, when a user attempts to, e.g., match all attributes a specific type may own, they are greeted with a TypeQL error:
test::data::read> match person owns $n;
[TQL03] TypeQL Error: There is a syntax error at line 1:
match person owns $n;
^
no viable alternative at input 'match person owns $n;'
This is because all statements in a match query must currently start with a variable.
Current Workaround
Currently the user would have to introduce a variable binding for the type and either filter it out at the end of the query, or accept an extraneous concept in each answer.
match
$t type person;
$t owns $att;
get $att;
Proposed Solution
We could treat person owns $n; as a valid pattern which decomposes into $_0 type person; $_0 owns $n;.
Note that there is no danger in this allowing trivial queries like person owns name; (which would either be redundant or immediately unsatisfiable depending on the schema) because of the requirement that each statement contain a named variable.
The text was updated successfully, but these errors were encountered:
Problem to Solve
Corrently, when a user attempts to, e.g., match all attributes a specific type may own, they are greeted with a TypeQL error:
This is because all statements in a match query must currently start with a variable.
Current Workaround
Currently the user would have to introduce a variable binding for the type and either filter it out at the end of the query, or accept an extraneous concept in each answer.
Proposed Solution
We could treat
person owns $n;
as a valid pattern which decomposes into$_0 type person; $_0 owns $n;
.Note that there is no danger in this allowing trivial queries like
person owns name;
(which would either be redundant or immediately unsatisfiable depending on the schema) because of the requirement that each statement contain a named variable.The text was updated successfully, but these errors were encountered: