Module: EM::Synchrony::ActiveRecord::Adapter

Included in:
ActiveRecord::ConnectionAdapters::EMMysql2Adapter
Defined in:
lib/em-synchrony/activerecord.rb

Instance Method Summary collapse

Instance Method Details

#configure_connectionObject


44
45
46
# File 'lib/em-synchrony/activerecord.rb', line 44

def configure_connection
  nil
end

#decrement_open_transactionsObject


66
67
68
# File 'lib/em-synchrony/activerecord.rb', line 66

def decrement_open_transactions
  real_connection.open_transactions -= 1
end

#increment_open_transactionsObject


62
63
64
# File 'lib/em-synchrony/activerecord.rb', line 62

def increment_open_transactions
  real_connection.open_transactions += 1
end

#open_transactionsObject


58
59
60
# File 'lib/em-synchrony/activerecord.rb', line 58

def open_transactions
  real_connection.open_transactions
end

#real_connectionObject


54
55
56
# File 'lib/em-synchrony/activerecord.rb', line 54

def real_connection
  @connection.connection
end

#transaction(*args, &blk) ⇒ Object


48
49
50
51
52
# File 'lib/em-synchrony/activerecord.rb', line 48

def transaction(*args, &blk)
  @connection.execute(false) do |conn|
    super
  end
end