Active Record Connection Adapters Transaction State
Methods
- A
-
- C
-
- F
-
- I
-
- N
-
- R
-
Class Public methods
new(state = nil)
Link
Source:
show
|
on GitHub
def initialize(state = nil)
@state = state
@children = nil
end
Instance Public methods
add_child(state)
Link
Source:
show
|
on GitHub
def add_child(state)
@children ||= []
@children << state
end
committed?()
Link
Source:
show
|
on GitHub
def committed?
@state == :committed || @state == :fully_committed
end
completed?()
Link
Source:
show
|
on GitHub
def completed?
committed? || rolledback?
end
full_commit!()
Link
Source:
show
|
on GitHub
def full_commit!
@state = :fully_committed
end
full_rollback!()
Link
Source:
show
|
on GitHub
def full_rollback!
@children&.each { |c| c.rollback! }
@state = :fully_rolledback
end
fully_committed?()
Link
Source:
show
|
on GitHub
def fully_committed?
@state == :fully_committed
end
fully_rolledback?()
Link
Source:
show
|
on GitHub
def fully_rolledback?
@state == :fully_rolledback
end
invalidate!()
Link
Source:
show
|
on GitHub
def invalidate!
@children&.each { |c| c.invalidate! }
@state = :invalidated
end
invalidated?()
Link
Source:
show
|
on GitHub
def invalidated?
@state == :invalidated
end
rollback!()
Link
Source:
show
|
on GitHub
def rollback!
@children&.each { |c| c.rollback! }
@state = :rolledback
end
rolledback?()
Link
Source:
show
|
on GitHub
def rolledback?
@state == :rolledback || @state == :fully_rolledback
end