cancel
Showing results for 
Search instead for 
Did you mean: 

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

tudor
Node

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

gerrit_meier
Neo4j
Neo4j

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

gerrit_meier
Neo4j
Neo4j

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.