class DB::TopLevelTransaction

Defined in:

db/transaction.cr

Constructors

Instance Method Summary

Instance methods inherited from class DB::Transaction

commit commit, connection : Connection connection, release_from_nested_transaction release_from_nested_transaction, rollback rollback

Instance methods inherited from module DB::BeginTransaction

begin_transaction : Transaction begin_transaction, transaction(& : Transaction -> T) : T | Nil forall T transaction

Instance methods inherited from module DB::Disposable

close close, closed? closed?

Constructor Detail

def self.new(connection : Connection) #

[View source]

Instance Method Detail

def begin_transaction : Transaction #
Description copied from module DB::BeginTransaction

Creates a transaction from the current context. If is expected that either Transaction#commit or Transaction#rollback are called explicitly to release the context.


[View source]
def commit #
Description copied from class DB::Transaction

commits the current transaction


[View source]
def connection : Connection #

[View source]
def rollback #
Description copied from class DB::Transaction

rollbacks the current transaction


[View source]