Python 如何通过参数创建新节点
我想通过使用cypher查询向其传递参数来创建新节点及其属性:Python 如何通过参数创建新节点,python,neo4j,cypher,py2neo,Python,Neo4j,Cypher,Py2neo,我想通过使用cypher查询向其传递参数来创建新节点及其属性: @app.route('/enter',methods=['post']) def enter_products(): results = graph.cypher.execute("CREATE (a:Products{"name","age"})") 您只需将映射作为参数传入,参数映射中的每个条目都可以作为查询中的{key}参数使用: @app.route('/enter',methods=['post']) de
@app.route('/enter',methods=['post'])
def enter_products():
results = graph.cypher.execute("CREATE (a:Products{"name","age"})")
您只需将映射作为参数传入,参数映射中的每个条目都可以作为查询中的
{key}
参数使用:
@app.route('/enter',methods=['post'])
def enter_products():
params = {"data": {"name":"Gokul","age":23}}
results = graph.cypher.execute("CREATE (a:Products {data})",params)
我更新了python的映射语法(我想)。您是否收到任何错误消息?500内部服务器错误内部服务器错误服务器遇到内部错误,无法完成您的请求。服务器过载或应用程序中存在错误