class ActiveRecord::ConnectionAdapters::TransactionState

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/active_record/connection_adapters/abstract/transaction.rbs

class ActiveRecord::ConnectionAdapters::TransactionState
  def add_child: (ActiveRecord::ConnectionAdapters::TransactionState state) -> untyped
  def commit!: () -> Symbol
  def full_rollback!: () -> Symbol
  def initialize: (?nil state) -> void
  def invalidated?: () -> false
  def rollback!: () -> Symbol
end

def add_child(state)

Experimental RBS support (using type sampling data from the type_fusion project).

def add_child: (ActiveRecord::ConnectionAdapters::TransactionState state) -> untyped

This signature was generated using 1 sample from 1 application.

def add_child(state)
  @children ||= []
  @children << state
end

def commit!

Experimental RBS support (using type sampling data from the type_fusion project).

def commit!: () -> Symbol

This signature was generated using 2 samples from 1 application.

def commit!
  @state = :committed
end

def committed?

def committed?
  @state == :committed || @state == :fully_committed
end

def completed?

def completed?
  committed? || rolledback?
end

def finalized?

def finalized?
  @state
end

def full_commit!

def full_commit!
  @state = :fully_committed
end

def full_rollback!

Experimental RBS support (using type sampling data from the type_fusion project).

def full_rollback!: () -> Symbol

This signature was generated using 5 samples from 1 application.

def full_rollback!
  @children&.each { |c| c.rollback! }
  @state = :fully_rolledback
end

def fully_committed?

def fully_committed?
  @state == :fully_committed
end

def fully_completed?

def fully_completed?
  completed?
end

def fully_rolledback?

def fully_rolledback?
  @state == :fully_rolledback
end

def initialize(state = nil)

Experimental RBS support (using type sampling data from the type_fusion project).

def initialize: (?nil state) -> void

This signature was generated using 10 samples from 1 application.

def initialize(state = nil)
  @state = state
  @children = nil
end

def invalidate!

def invalidate!
  @children&.each { |c| c.invalidate! }
  @state = :invalidated
end

def invalidated?

Experimental RBS support (using type sampling data from the type_fusion project).

def invalidated?: () -> false

This signature was generated using 13 samples from 1 application.

def invalidated?
  @state == :invalidated
end

def nullify!

def nullify!
  @state = nil
end

def rollback!

Experimental RBS support (using type sampling data from the type_fusion project).

def rollback!: () -> Symbol

This signature was generated using 1 sample from 1 application.

def rollback!
  @children&.each { |c| c.rollback! }
  @state = :rolledback
end

def rolledback?

def rolledback?
  @state == :rolledback || @state == :fully_rolledback
end