Skip to content
subvertallchris edited this page Oct 12, 2014 · 11 revisions

Example of how to rollback a transaction:

Neo4j::Transaction.run do |tx|
   Neo4j::Node.create
   Person.create
   tx.fail
end

Or:

begin
  tx = Neo4j::Transaction.new
  # your code
rescue MyErrorClass
  tx.failure
ensure
  tx.close
end

When version 3.0 of this gem was released. There were limitations that prevented full transactional endpoint support with Neo4j Server. These were resolved in neo4j-core 3.0.1.

API

Clone this wiki locally