module Jennifer::Adapter::Transactions
Direct including types
Defined in:
jennifer/adapter/transactions.crInstance Method Summary
-
#begin_transaction
Starts manual transaction for current fiber.
-
#current_transaction
Returns current transaction or
nil
. -
#rollback_transaction
Closes manual transaction for current fiber.
-
#subscribe_on_commit(block : -> Bool)
Subscribes given block to
commit
current transaction event. -
#subscribe_on_rollback(block : -> Bool)
Subscribes given block to
rollback
current transaction event. -
#transaction(&)
Starts a transaction and yields it to the given block.
-
#under_transaction?
Returns whether current context has opened transaction.
-
#with_connection(&)
Yields current connection or checkout a new one.
-
#with_manual_connection(&)
Yields new checkout connection.
Instance Method Detail
def begin_transaction
#
Starts manual transaction for current fiber. Designed for usage in test callback.
def rollback_transaction
#
Closes manual transaction for current fiber. Designed for usage in test callback.
def subscribe_on_commit(block : -> Bool)
#
Subscribes given block to commit
current transaction event.
def subscribe_on_rollback(block : -> Bool)
#
Subscribes given block to rollback
current transaction event.