Package-level declarations

Types

Link copied to clipboard

TransactionManager implementation registered to the provided database value db.

Link copied to clipboard

Represents a unit block of work that is performed on a database.

Link copied to clipboard

Represents the manager registered to a database, which is responsible for creating new transactions and storing data related to the database and its transactions.

Link copied to clipboard
class TransactionStore<T : Any>(val init: Transaction.() -> T? = null) : ReadWriteProperty<Any?, T?>

Class responsible for implementing property delegates of read-write properties in the current transaction's UserDataHolder.

Properties

Link copied to clipboard

The TransactionManager instance that is associated with this Database.

Functions

Link copied to clipboard
fun <T> inTopLevelTransaction(transactionIsolation: Int, readOnly: Boolean = false, db: Database? = null, outerTransaction: Transaction? = null, statement: Transaction.() -> T): T

Creates a transaction with the specified transactionIsolation and readOnly settings, then calls the statement block with this transaction as its receiver and returns the result.

Link copied to clipboard

Returns the result of reading/writing transaction data stored within the scope of the current transaction, or null if no data is found.

Link copied to clipboard
fun <T> transaction(db: Database? = null, statement: Transaction.() -> T): T

Creates a transaction then calls the statement block with this transaction as its receiver and returns the result.

fun <T> transaction(transactionIsolation: Int, readOnly: Boolean = false, db: Database? = null, statement: Transaction.() -> T): T

Creates a transaction with the specified transactionIsolation and readOnly settings, then calls the statement block with this transaction as its receiver and returns the result.

Link copied to clipboard

Returns the result of reading/writing transaction data stored within the scope of the current transaction.