Transaction

abstract class Transaction : TransactionCallbacks

A SQL transaction. Can be created through the driver via SqlDriver.newTransaction or through an implementation of Transacter by calling Transacter.transaction.

A transaction is expected never to escape the thread it is created on, or more specifically, never to escape the lambda scope of Transacter.transaction and Transacter.transactionWithResult.

Constructors

Transaction
Link copied to clipboard
common
fun Transaction()

Functions

afterCommit
Link copied to clipboard
common
open override fun afterCommit(function: () -> Unit)
Queues function to be run after this transaction successfully commits.
afterRollback
Link copied to clipboard
common
open override fun afterRollback(function: () -> Unit)
Queues function to be run after this transaction rolls back.