class EmmyExtends::ActiveRecord::Adapter
Public Instance Methods
add_transaction_record(record)
click to toggle source
Register a record with the current transaction so that its after_commit and after_rollback callbacks can be called.
# File lib/emmy_extends/activerecord/adapter.rb, line 56 def add_transaction_record(record) current_transaction.add_record(record) end
configure_connection()
click to toggle source
# File lib/emmy_extends/activerecord/adapter.rb, line 3 def configure_connection nil end
decrement_open_transactions()
click to toggle source
# File lib/emmy_extends/activerecord/adapter.rb, line 25 def decrement_open_transactions real_connection.open_transactions -= 1 end
increment_open_transactions()
click to toggle source
# File lib/emmy_extends/activerecord/adapter.rb, line 21 def increment_open_transactions real_connection.open_transactions += 1 end
open_transactions()
click to toggle source
# File lib/emmy_extends/activerecord/adapter.rb, line 17 def open_transactions real_connection.open_transactions end
real_connection()
click to toggle source
# File lib/emmy_extends/activerecord/adapter.rb, line 13 def real_connection @connection.connection end
transaction(*args, &blk)
click to toggle source
Calls superclass method
# File lib/emmy_extends/activerecord/adapter.rb, line 7 def transaction(*args, &blk) @connection.execute(false) do |conn| super end end
transaction_open?()
click to toggle source
# File lib/emmy_extends/activerecord/adapter.rb, line 33 def transaction_open? current_transaction.open? end
Protected Instance Methods
set_current_transaction(t)
click to toggle source
# File lib/emmy_extends/activerecord/adapter.rb, line 62 def set_current_transaction(t) if t == @closed_transaction @transaction.delete(Fiber.current.object_id) else @transaction[Fiber.current.object_id] = t end end