SuspendingTransacter

A transaction-aware SqlDriver wrapper which can begin a Transaction on the current connection.

Inheritors

Types

Link copied to clipboard

An interface that can be implemented by a SqlDriver to provide a specific coroutine context for transactions.

Functions

Link copied to clipboard
abstract suspend fun transaction(noEnclosing: Boolean = false, body: suspend SuspendingTransactionWithoutReturn.() -> Unit)

Starts a Transaction and runs body in that transaction.

Link copied to clipboard
abstract suspend fun <R> transactionWithResult(noEnclosing: Boolean = false, bodyWithReturn: suspend SuspendingTransactionWithReturn<R>.() -> R): R

Starts a Transaction and runs bodyWithReturn in that transaction.