Skip to content

Commit

Permalink
add info about CypherTransaction lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
subvertallchris committed Dec 31, 2014
1 parent c67a8c2 commit 0f7d2dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/neo4j-server/cypher_transaction.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
module Neo4j::Server
# The CypherTransaction object lifecycle is as follows:
# * It is initialized with the transactional endpoint URL and the connection object to use for communication. It does not communicate with the server to create this.
# * The first query within the transaction sets the commit and execution addresses, :commit_url and :exec_url.
# * At any time, `failure` can be called to mark a transaction failed and trigger a rollback upon closure.
# * `close` is called to end the transaction. It calls `_commit_tx` or `_delete_tx`.
#
# If a transaction is created and then closed without performing any queries, an OpenStruct is returned that behaves like a successfully closed query.
class CypherTransaction
include Neo4j::Transaction::Instance
include Neo4j::Core::CypherTranslator
Expand Down

0 comments on commit 0f7d2dd

Please sign in to comment.