# Package-level declarations

## Functions

newSuspendedTransaction
Link copied to clipboard
suspend fun <T> newSuspendedTransaction(context: CoroutineContext? = null, db: Database? = null, transactionIsolation: Int? = null, statement: suspend Transaction.() -> T): T

Creates a new `TransactionScope` then calls the specified suspending statement, suspends until it completes, and returns the result.

suspendedTransactionAsync
Link copied to clipboard
suspend fun <T> suspendedTransactionAsync(context: CoroutineContext? = null, db: Database? = null, transactionIsolation: Int? = null, statement: suspend Transaction.() -> T): Deferred<T>

Creates a new `TransactionScope` and returns its future result as an implementation of Deferred.

withSuspendTransaction
Link copied to clipboard
suspend fun <T> Transaction.withSuspendTransaction(context: CoroutineContext? = null, statement: suspend Transaction.() -> T): T

Calls the specified suspending statement, suspends until it completes, and returns the result.