Package-level declarations

Types

Link copied to clipboard

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

Link copied to clipboard

TransactionManager implementation registered to the provided database value db.

Properties

Link copied to clipboard

The TransactionManager instance that is associated with this Database.

Functions

Link copied to clipboard
suspend fun <T> inTopLevelSuspendTransaction(db: Database? = null, transactionIsolation: Int? = db?.transactionManager?.defaultIsolationLevel, readOnly: Boolean? = db?.transactionManager?.defaultReadOnly, outerTransaction: JdbcTransaction? = null, statement: suspend JdbcTransaction.() -> T): T

Creates a suspendable transaction at the top level 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
fun <T> inTopLevelTransaction(db: Database? = null, transactionIsolation: Int? = db?.transactionManager?.defaultIsolationLevel, readOnly: Boolean? = db?.transactionManager?.defaultReadOnly, outerTransaction: JdbcTransaction? = null, statement: JdbcTransaction.() -> 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
suspend fun <T> suspendTransaction(db: Database? = null, transactionIsolation: Int? = db?.transactionManager?.defaultIsolationLevel, readOnly: Boolean? = db?.transactionManager?.defaultReadOnly, statement: suspend JdbcTransaction.() -> T): T

Creates a suspendable 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
fun <T> transaction(db: Database? = null, transactionIsolation: Int? = db?.transactionManager?.defaultIsolationLevel, readOnly: Boolean? = db?.transactionManager?.defaultReadOnly, statement: JdbcTransaction.() -> 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.