Module: EM::Synchrony::ActiveRecord::Adapter
- Included in:
- ActiveRecord::ConnectionAdapters::EMMysql2Adapter
- Defined in:
- lib/em-synchrony/activerecord.rb
Instance Method Summary collapse
- #configure_connection ⇒ Object
- #decrement_open_transactions ⇒ Object
- #increment_open_transactions ⇒ Object
- #open_transactions ⇒ Object
- #real_connection ⇒ Object
- #transaction(*args, &blk) ⇒ Object
Instance Method Details
#configure_connection ⇒ Object
44 45 46 |
# File 'lib/em-synchrony/activerecord.rb', line 44 def configure_connection nil end |
#decrement_open_transactions ⇒ Object
66 67 68 |
# File 'lib/em-synchrony/activerecord.rb', line 66 def decrement_open_transactions real_connection.open_transactions -= 1 end |
#increment_open_transactions ⇒ Object
62 63 64 |
# File 'lib/em-synchrony/activerecord.rb', line 62 def increment_open_transactions real_connection.open_transactions += 1 end |
#open_transactions ⇒ Object
58 59 60 |
# File 'lib/em-synchrony/activerecord.rb', line 58 def open_transactions real_connection.open_transactions end |
#real_connection ⇒ Object
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 |