edge badge
Methods
A
C
F
N
R
Class Public methods
new(state = nil)
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 6
def initialize(state = nil)
  @state = state
  @children = nil
end
Instance Public methods
add_child(state)
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 11
def add_child(state)
  @children ||= []
  @children << state
end
commit!()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 54
def commit!
  @state = :committed
end
committed?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 20
def committed?
  @state == :committed || @state == :fully_committed
end
completed?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 40
def completed?
  committed? || rolledback?
end
finalized?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 16
def finalized?
  @state
end
full_commit!()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 58
def full_commit!
  @state = :fully_committed
end
full_rollback!()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 49
def full_rollback!
  @children&.each { |c| c.rollback! }
  @state = :fully_rolledback
end
fully_committed?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 24
def fully_committed?
  @state == :fully_committed
end
fully_completed?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 36
def fully_completed?
  completed?
end
fully_rolledback?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 32
def fully_rolledback?
  @state == :fully_rolledback
end
nullify!()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 62
def nullify!
  @state = nil
end
rollback!()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 44
def rollback!
  @children&.each { |c| c.rollback! }
  @state = :rolledback
end
rolledback?()
# File activerecord/lib/active_record/connection_adapters/abstract/transaction.rb, line 28
def rolledback?
  @state == :rolledback || @state == :fully_rolledback
end