Class: ActiveRecord::ConnectionAdapters::RealTransaction
Relationships & Source Files | |
Inherits: |
ActiveRecord::ConnectionAdapters::Transaction
|
Defined in: | activerecord/lib/active_record/connection_adapters/abstract/transaction.rb |
Instance Method Summary
Instance Method Details
#commit
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/transaction.rb', line 218
def commit connection.commit_db_transaction if materialized? @state.full_commit! end
#materialize!
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/transaction.rb', line 203
def materialize! if isolation_level connection.begin_isolated_db_transaction(isolation_level) else connection.begin_db_transaction end super end
#rollback
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/transaction.rb', line 213
def rollback connection.rollback_db_transaction if materialized? @state.full_rollback! end