-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
Description
Calling match
and delete
with one variable, and insert
with another, results in a TypeQL Error. The insert
should be independent of the match
and delete
.
Environment
- OS (where TypeDB server runs): Mac OS 12.6
- TypeDB version (and platform): TypeDB Cluster 2.13
- TypeDB client: TypeDB Studio 12.13
Reproducible Steps
Steps to create the smallest reproducible scenario:
- Create the minimal schema
define
name sub attribute,
value string;
person sub entity,
owns name @key;
- Run the minimal query
match $a isa person, has name "alice"; delete $a isa person;
insert $b isa person, has name "bob";
Expected Output
alice
to be deleted, if exists. bob
to be created.
Actual Output
The TypeQL error is generated
[TQL18] TypeQL Error: None of the variables in 'insert' ('[$b isa person,
has name "bob"]') is within scope of 'match' ('[$a]')