3

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

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

我努力了:

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

在我的服务器上

我收到错误:-

`.' expected but `=' found

我究竟做错了什么?

4

1 回答 1

4

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);
于 2013-01-21T14:57:34.260 回答