Zhiyuan  Zhou
Zhiyuan Zhou

Reputation: 85

how to dry run neo4j cypher queries

I was trying to write a query in neo4j browser to make some data changes. However, I don't have confidence if it will work or not. So I was wondering if there is any way I can dry run the queries before I actually run it. Or is there any way I can revert a wrong query?

The idea here is like the powershell whatif commands to avoid accidents: http://www.computerperformance.co.uk/powershell/powershell_whatif_confirm.htm

Thanks

Upvotes: 3

Views: 763

Answers (1)

Sander Ardinois
Sander Ardinois

Reputation: 96

You can prepend your statement with EXPLAIN. This will profile your query without actually running it.

Check this link for more info on profiling: https://neo4j.com/docs/developer-manual/current/cypher/query-tuning/how-do-i-profile-a-query/

Upvotes: 4

Related Questions