neo4j cypher set statement with parameter map

荒凉一梦 提交于 2019-12-23 17:52:01

问题


I'm struggling to find a definition of how to use the set cypher command with a parameter map

Cheat sheet says use: SET n = {map}

I have tried:

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

on my server

I get error:-

`.' expected but `=' found

What am I doing wrong?


回答1:


The map parameter could be used like this:

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);


来源:https://stackoverflow.com/questions/14439414/neo4j-cypher-set-statement-with-parameter-map

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!