Reputation: 290
For DETACH DELETE in cypher, what occurs if the node does not exist in the database? Will there be a null string returned?
My objective is to remove a node from the graph, then add it back afterwards (I am trying to avoid the use of MERGE because there can be multiple properties on the node that are not going to be known or checked before wanted to add it into the graph).
Thanks
Upvotes: 0
Views: 2248
Reputation: 7478
If you do this :
OPTION MATCH (n:Qwertyuiop)
DETACH DELETE n
RETURN n
Yes you will have null.
But you should also be aware that if you delete a node and then return itm the returned node will be empty. Like in SQL, Neo4j can't return data that has been deleted.
I don't understand what you are trying to do, but if you can be a little more clear on your merge
problem, perhaps we can find a solution to it.
Upvotes: 0