class Neo4j::Core::CypherSession::Transactions::Base
Public Instance Methods
after_commit(&block)
click to toggle source
# File lib/neo4j/core/cypher_session/transactions.rb 28 def after_commit(&block) 29 after_commit_registry << block 30 end
after_commit_registry()
click to toggle source
# File lib/neo4j/core/cypher_session/transactions.rb 24 def after_commit_registry 25 @after_commit_registry ||= [] 26 end
post_close!()
click to toggle source
Calls superclass method
Neo4j::Transaction::Base#post_close!
# File lib/neo4j/core/cypher_session/transactions.rb 32 def post_close! 33 super 34 after_commit_registry.each(&:call) unless failed? 35 end
queries(options = {}, &block)
click to toggle source
# File lib/neo4j/core/cypher_session/transactions.rb 20 def queries(options = {}, &block) 21 adaptor.queries(@session, {transaction: self}.merge(options), &block) 22 end
query(*args)
click to toggle source
# File lib/neo4j/core/cypher_session/transactions.rb 8 def query(*args) 9 options = if args[0].is_a?(::Neo4j::Core::Query) 10 args[1] ||= {} 11 else 12 args[1] ||= {} 13 args[2] ||= {} 14 end 15 options[:transaction] ||= self 16 17 adaptor.query(@session, *args) 18 end
Private Instance Methods
adaptor()
click to toggle source
Because we're inheriting from the old Transaction
class but the new adaptors work much like the old sessions
# File lib/neo4j/core/cypher_session/transactions.rb 41 def adaptor 42 @session.adaptor 43 end