cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

settings a parameter from a Cypher not working in cypher-shell.

I try to set a parameter from cypher result using cypher-shell script and it doesn't seem to work. However, it works when I use the same in the browser.

Here is an example from the Neo4j documentation https://neo4j.com/docs/browser-manual/current/operations/query-parameters/

Using cypher-sheel I run: 

:param result1 => { RETURN 1 AS foo } and the error is ...

Incorrect number of arguments.
usage: :param name => value

What am I doing wrong

 

 

1 ACCEPTED SOLUTION

The concept of parameters is something special for every tool (in this case browser and cypher-shell).
You have linked the browser manual where query results are totally fine. The tool itself executes the query and then populates the parameter with the result value (and keeps it for later queries).
In cypher-shell (https://neo4j.com/docs/operations-manual/4.4/tools/cypher-shell/#cypher-shell-parameters) this feature is limited to the cypher-types and there is no evaluation of a provided query.

 

View solution in original post

1 REPLY 1

The concept of parameters is something special for every tool (in this case browser and cypher-shell).
You have linked the browser manual where query results are totally fine. The tool itself executes the query and then populates the parameter with the result value (and keeps it for later queries).
In cypher-shell (https://neo4j.com/docs/operations-manual/4.4/tools/cypher-shell/#cypher-shell-parameters) this feature is limited to the cypher-types and there is no evaluation of a provided query.