Active Record Savepoint Transaction
Methods
- C
- F
- M
- N
- R
Class Public methods
new(connection, savepoint_name, parent_transaction, **options) Link
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 405 def initialize(connection, savepoint_name, parent_transaction, **options) super(connection, **options) parent_transaction.state.add_child(@state) if isolation_level raise ActiveRecord::TransactionIsolationError, "cannot set transaction isolation in a nested transaction" end @savepoint_name = savepoint_name end
Instance Public methods
commit() Link
full_rollback?() Link
materialize!() Link
restart() Link
rollback() Link
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 431 def rollback unless @state.invalidated? connection.rollback_to_savepoint(savepoint_name) if materialized? && connection.active? end @state.rollback! @instrumenter.finish(:rollback) if materialized? end