Module: DataMapper::Transaction::Adapter

Module | DataMapper::Transaction::Adapter
In: | lib/dm-core/transaction.rb

### Methods

close_connection current_transaction included open_connection pop_transaction push_transaction transaction_primitive

### Public Class methods

included(base)

TODO: document @api private

### Public Instance methods

close_connection(connection)

TODO: document @api semipublic

current_transaction()

Retrieve the current transaction for this Adapter.

Everything done by this Adapter is done within the context of this Transaction.

@return [Transaction]

      the 'current' transaction for this Adapter.

@api private

open_connection()

TODO: document @api semipublic

pop_transaction()

Pop the ‘current’ Transaction from the per thread Transaction stack so that everything done by this Adapter is no longer necessarily within the context of said Transaction.

@return [Transaction]

      the former 'current' transaction.

@api private

push_transaction(transaction)

Pushes the given Transaction onto the per thread Transaction stack so that everything done by this Adapter is done within the context of said Transaction.

@param [Transaction] transaction

      a Transaction to be the 'current' transaction until popped.

@return [Array(Transaction)]

      the stack of active transactions for the current thread

@api private

transaction_primitive()

Produces a fresh transaction primitive for this Adapter

Used by Transaction to perform its various tasks.

@return [Object]

      a new Object that responds to :close, :begin, :commit,
      and :rollback,

@api private

[Validate]