Class: ActiveRecord::ConnectionAdapters::RealTransaction
Relationships & Source Files | |
Inherits: |
ActiveRecord::ConnectionAdapters::Transaction
|
Defined in: | activerecord/lib/active_record/connection_adapters/abstract/transaction.rb |
Class Method Summary
Instance Method Summary
Constructor Details
.new(connection, options, *args) ⇒ RealTransaction
# File 'activerecord/lib/active_record/connection_adapters/abstract/transaction.rb', line 170
def initialize(connection, , *args) super if [:isolation] connection.begin_isolated_db_transaction( [:isolation]) else connection.begin_db_transaction end end
Instance Method Details
#commit
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/transaction.rb', line 184
def commit connection.commit_db_transaction @state.full_commit! end
#rollback
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/transaction.rb', line 179
def rollback connection.rollback_db_transaction @state.full_rollback! end