raycons
raycons

Reputation: 825

Neo4j cypher keeping track of delete Nodes/relationships

When I delete a Node, Relationship in Java executing Cypher:

MATCH (n { name: 'Andres' })-[r]-() DELETE n, r

or

DELETE (n) where id(n)=3;

is there a way to keep track of the Nodes, Relationships I've deleted? Getting the Id or the Object(Node/Rs).

Upvotes: 1

Views: 107

Answers (1)

Michael Hunger
Michael Hunger

Reputation: 41676

You can use an transaction event handler

Or something like this change-feed extension

In general cypher can return statistics about the number of deleted entities in result.getQueryStatistics()

Upvotes: 1

Related Questions