gpt4 book ai didi

带有参数映射的 neo4j cypher set 语句

转载 作者:行者123 更新时间:2023-12-01 12:47:38 24 4
gpt4 key购买 nike

我正在努力寻找如何使用带有参数映射的 set cypher 命令的定义

备忘单说使用:SET n = {map}

我试过:

START n = node(11379)
SET n = {Name: "Random Test Change"}

在我的服务器上

我收到错误:-

`.' expected but `=' found

我做错了什么?

最佳答案

map 参数可以这样使用:

String query = "START n = node(11379) SET n = {map}";

Map<String, String> myMap = new HashMap<String, String>();
myMap.put("Name", "Random Test Change");

Map<String, Object> queryParameters = new HashMap<String, Object>();
queryParameters.put("map", myMap);

ExecutionEngine engine = new ExecutionEngine(graphDatabase);
executionResult = engine.execute(query, queryParameters);

关于带有参数映射的 neo4j cypher set 语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14439414/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com