transactionWithResult

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

Starts a Transaction and runs body in that transaction.

Throws

IllegalStateException

if noEnclosing is true and there is already an active Transaction on this thread.