neo4j-rest-client icon indicating copy to clipboard operation
neo4j-rest-client copied to clipboard

Question: How do I pass parameters to a cypher query?

Open sam-jay opened this issue 8 years ago • 3 comments

Couldn't find this info in the docs

sam-jay avatar Dec 19 '16 18:12 sam-jay

Recommended way is by using the Neo4j builtin parameter passing:

q = """match n-[r:`{rel}`]-() return n, n.name, r"""
params = {
    "rel": rel_type,
}
results = self.gdb.query(q, params=params,
                            returns=(client.Node, str, client.Relationship))

versae avatar Dec 20 '16 18:12 versae

This is a bug in documentation, please document the params argument of GraphDatabase.query().

franekp avatar Oct 17 '17 12:10 franekp

You are absolutely right, @franekp. Unfortunately, I don't have the time to maintain the library anymore. Any help or PR's are welcome.

versae avatar Oct 17 '17 14:10 versae