pdpotter commented on issue #65:
URL: https://github.com/apache/incubator-age/issues/65#issuecomment-833346492


   From 
https://github.com/apache/incubator-age/issues/43#issuecomment-799599013:
   > The format `$1` is the Postgres format for parameters and cannot be used 
in the cypher query. Parameters in the cypher query must take the format 
`$parameter_name`. When you want to pass parameters to a cypher query, you must 
add a third argument to the cypher query. This argument must be a Postgres 
parameter. So your query must look like:
   > 
   > `SELECT * FROM cypher('testgraph', $$CREATE (v:Person {name: 
$var_name})$$, $1) as (a agtype);`
   > 
   > When executing the query the value passed to `$1` must be an agtype map, 
where the key is the variable name. NOTE: All parameters in the cypher query 
are passed in the map.
   
   For more information, see the section `Prepared Statements` in the [AGE 
Guide (PDF)](https://age.apache.org/docs/Apache_AGE_Guide.pdf).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to