在python中neo4j.v1 cypher 中Label和Relationship能否传入变量?
driver = GraphDatabase.driver(“bolt://localhost:7687”, auth=basic_auth(“neo4j”, “neo4j”)) session = driver.session() cypher_staement ="""“ match (a:$label)-[r:$relationship]->(b) where id(a) = $id return b ”"" result = session.run(cypher_staement, label=“Person”, relationship=“KNOW”, id = 123)
以上代码出错,请问各位高手,有没有什么办法实现Label和Relationship支持变量传入?