edge badge
Methods
C
F
M
N
R
Class Public methods
new(connection, savepoint_name, parent_transaction, **options)
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 148
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()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 170
def commit
  connection.release_savepoint(savepoint_name) if materialized?
  @state.commit!
end
full_rollback?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 175
def full_rollback?; false; end
materialize!()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 160
def materialize!
  connection.create_savepoint(savepoint_name)
  super
end
rollback()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 165
def rollback
  connection.rollback_to_savepoint(savepoint_name) if materialized?
  @state.rollback!
end