openCypher icon indicating copy to clipboard operation
openCypher copied to clipboard

confuse about `CONSTRUCT` and `UPDATE`

Open linsimiao opened this issue 5 years ago • 1 comments

hi all, I have read your documentation. I found it easy to mix CONSTRUCT with UPDATE. I wonder whether the following cyphers mean the same.

FROM xxx match (a:Person) UPDATE GRAPH merge (b:Student{name:a.name})

and

FROM xxx match (a:Person) CONSTRUCT merge (b:Student{name:a.name})

suppose the working graph is yyy, is it both two cyphers will lead to create nodes with a label Student in the graph yyy.

Thanks for your reply.

linsimiao avatar Dec 26 '19 06:12 linsimiao

I think FROM xxx match (a:Person) UPDATE GRAPH merge (b:Student{name:a.name}) is not a valid statement. In UPDATE GRAPH you only get to do DELETE, SET, REMOVE on prior matched variables. With which software, you intend to use this functionality?

hvub avatar Mar 13 '20 08:03 hvub