Set neo4j cypher statement with parameter map

I am trying to find a definition of how to use the set cypher command with a parameter map

The cheat sheet says: SET n = {map}

I tried:

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

      

on my server

I get an error: -

`.' expected but `=' found

      

What am I doing wrong?

+3


source to share


1 answer


The map parameter can 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);

      

+4


source







All Articles