Hi,
I am running this code and the first parameter is getting passed but the number in the reursive depth $n gives the error:
CypherSyntaxError: {code: Neo.ClientError.Statement.SyntaxError} {message: Parameter maps cannot be used in MATCH patterns (use a literal map instead, eg. "{id: {param}.id}")
Here is my code. If I put any number like 2 instead of $n it works:
params = {"prot": 'C', "n": 2}
with session.begin_transaction() as tx:
result = tx.run("MATCH p = (n:Protein { name:$prot })<-[:REGULATES*1..$n]->(b:Protein) \
WITH *, relationships(p) AS rs \
RETURN \
startNode(last(rs)).name AS Protein1, \
last(rs).direction AS Regulates, \
endNode(last(rs)).name AS Protein2, \
length(p) AS pathLength",
params)