Sha256: 4427139e83bdc8aeedfa472517c5251b607132b246f5b8047c66e1fc3ab003d7

Contents?: true

Size: 765 Bytes

Versions: 26

Compression:

Stored size: 765 Bytes

Contents

module Foobara
  class Entity < Model
    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

26 entries across 26 versions & 1 rubygems

Version Path
foobara-0.0.26 projects/entity/src/concerns/transactions.rb
foobara-0.0.25 projects/entity/src/concerns/transactions.rb
foobara-0.0.24 projects/entity/src/concerns/transactions.rb
foobara-0.0.23 projects/entity/src/concerns/transactions.rb
foobara-0.0.22 projects/entity/src/concerns/transactions.rb
foobara-0.0.21 projects/entity/src/concerns/transactions.rb
foobara-0.0.20 projects/entity/src/concerns/transactions.rb
foobara-0.0.19 projects/entity/src/concerns/transactions.rb
foobara-0.0.18 projects/entity/src/concerns/transactions.rb
foobara-0.0.17 projects/entity/src/concerns/transactions.rb
foobara-0.0.16 projects/entity/src/concerns/transactions.rb
foobara-0.0.15 projects/entity/src/concerns/transactions.rb
foobara-0.0.14 projects/entity/src/concerns/transactions.rb
foobara-0.0.13 projects/entity/src/concerns/transactions.rb
foobara-0.0.12 projects/entity/src/concerns/transactions.rb
foobara-0.0.11 projects/entity/src/concerns/transactions.rb
foobara-0.0.10 projects/entity/src/concerns/transactions.rb
foobara-0.0.9 projects/entity/src/concerns/transactions.rb
foobara-0.0.8 projects/entity/src/concerns/transactions.rb
foobara-0.0.7 projects/entity/src/concerns/transactions.rb