Reputation: 1666
Well I am writing server plugin. I want to know what should all commands come with in transaction ?
Like, is it a good programming to begin transaction at the beginning of function and end transaction before return or we should do it in some otherway.
One more thing : Is there any limitations on, what all we can write withing transaction. Can I write anything in java withing transaction like for loop, while loop , if , else ..
Thanks Amit Aggarwal
Upvotes: 0
Views: 80
Reputation: 19373
If you are using a release < Neo4j 2.0 then only operations that modify the database need to be wrapped in a transaction. In Neo4j 2.0, any operation that accesses the graph needs to be wrapped in a transaction.
You can definitely use loops/branches etc.
Upvotes: 2