Transaction

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

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun afterCommit(function: () -> Unit)

Queues function to be run after this transaction successfully commits.

Link copied to clipboard
open override fun afterRollback(function: () -> Unit)

Queues function to be run after this transaction rolls back.