(I believe that answering this question does not require understanding Rust.)
My Rust program is choking on the following query:
let query = format!(
r#"match
$container isa node, has id $container_id;
$contained isa node, has id "{}";
$rel isa contains (container: $container,
contained: $contained);
get $container_id;"#,
target_id
);
(The “{}” above is Rust’s way of letting me substitute target_id
into the match
expression.)
When I run it, I get the following error:
Error: Server(
[TQL0] [TQL03] TypeQL Error: There is a syntax error near 6:16:
match
$container isa node, has id $container_id;
$contained isa node, has id "2";
$rel isa contains (container: $container,
contained: $contained);
--> get $container_id;
^
Caused: Error in usage of TypeQL.
Caused: [TSV7] Query parsing failed.)
What’s wrong with that get
clause? I’ve tried all four combinations involving get, fetch, $ and ?, all with the same result.
My entire program can be found here[1]. The passage above appears in src/main
. The schema is at schema.tql
.
Many thanks in advance.