module Jennifer::Adapter::Transactions

Direct including types

Defined in:

jennifer/adapter/transactions.cr

Instance Method Summary

Instance Method Detail

def begin_transaction #

Starts manual transaction for current fiber. Designed for usage in test callback.


[View source]
def current_transaction #

Returns current transaction or nil.


[View source]
def rollback_transaction #

Closes manual transaction for current fiber. Designed for usage in test callback.


[View source]
def subscribe_on_commit(block : -> Bool) #

Subscribes given block to commit current transaction event.


[View source]
def subscribe_on_rollback(block : -> Bool) #

Subscribes given block to rollback current transaction event.


[View source]
def transaction(&) #

Starts a transaction and yields it to the given block.


[View source]
def under_transaction? #

Returns whether current context has opened transaction.


[View source]
def with_connection(&) #

Yields current connection or checkout a new one.


[View source]
def with_manual_connection(&) #

Yields new checkout connection.


[View source]