0

Unable to use with clause on beginning of CYPHER statement.

I want to set some parameter variable on with clause. But, AgensGraph returns error.

agens=# with 1 as value return value;
ERROR:  syntax error at or near "1"
LINE 1: with 1 as value return value;
             ^

How to use with clause on beginning of statement?

santino
  • 9
  • 1

1 Answers1

0

Unfortunately, SQL Grammar has WITH clause also.

AgensGraph parser assume WITH clause on beginning as SQL WITH clause.

For avoid it, You can use dummy OPTIONAL MATH clause.

agens=# optional match (n) with 1 as value limit 1 return value;
 value 
-------
 1
(1 row)
cullen
  • 51
  • 4