Sha256: 521653da4f404d92dd5383f7043f1cc1d6549e5f4633ea01825b9b0d6c6b2348

Contents?: true

Size: 774 Bytes

Versions: 8

Compression:

Stored size: 774 Bytes

Contents

module Foobara
  class Entity < DetachedEntity
    module Concerns
      module Transactions
        include Concern

        module ClassMethods
          def current_transaction_table
            Foobara::Persistence.current_transaction_table!(self)
          end

          def current_transaction
            Foobara::Persistence.current_transaction!(self)
          end

          def transaction(mode: nil, skip_dependent_transactions: false, &)
            if skip_dependent_transactions
              entity_base.transaction(mode, &)
            else
              Foobara::Persistence.transaction(
                self, *deep_depends_on,
                mode:,
                &
              )
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
foobara-0.0.38 projects/entity/src/concerns/transactions.rb
foobara-0.0.37 projects/entity/src/concerns/transactions.rb
foobara-0.0.36 projects/entity/src/concerns/transactions.rb
foobara-0.0.35 projects/entity/src/concerns/transactions.rb
foobara-0.0.34 projects/entity/src/concerns/transactions.rb
foobara-0.0.33 projects/entity/src/concerns/transactions.rb
foobara-0.0.32 projects/entity/src/concerns/transactions.rb
foobara-0.0.31 projects/entity/src/concerns/transactions.rb