Class: Neo4j::Core::CypherSession::Transactions::Bolt

Inherits:
Base show all
Defined in:
lib/neo4j/core/cypher_session/transactions/bolt.rb

Instance Attribute Summary

Attributes inherited from Transaction::Base

#root, #session

Instance Method Summary collapse

Methods inherited from Base

#after_commit, #after_commit_registry, #post_close!, #queries, #query

Methods inherited from Transaction::Base

#autoclosed!, #close, #closed?, #expired?, #failed?, #inspect, #mark_expired, #mark_failed, #root?

Constructor Details

#initialize(*args) ⇒ Bolt

Returns a new instance of Bolt.



8
9
10
11
12
# File 'lib/neo4j/core/cypher_session/transactions/bolt.rb', line 8

def initialize(*args)
  super

  tx_query('BEGIN') if root?
end

Instance Method Details

#commitObject



14
15
16
# File 'lib/neo4j/core/cypher_session/transactions/bolt.rb', line 14

def commit
  tx_query('COMMIT') if root?
end

#deleteObject



18
19
20
# File 'lib/neo4j/core/cypher_session/transactions/bolt.rb', line 18

def delete
  tx_query('ROLLBACK')
end

#started?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/neo4j/core/cypher_session/transactions/bolt.rb', line 22

def started?
  true
end