简体   繁体   中英

neo4j cypher set statement with parameter map

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM