TransactionInterface

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

Inheritors

Properties

Link copied to clipboard
abstract val connection: ExposedConnection<*>

The database connection used by the transaction.

Link copied to clipboard
abstract val db: Database

The database on which the transaction tasks are performed.

Link copied to clipboard

The parent transaction of a nested transaction; otherwise, null if the transaction is a top-level instance.

Link copied to clipboard
abstract val readOnly: Boolean

Whether the transaction is in read-only mode.

Link copied to clipboard

The transaction isolation level of the transaction, which may differ from the set database level.

Functions

Link copied to clipboard
abstract fun close()

Closes the transaction and releases any savepoints.

Link copied to clipboard
abstract fun commit()

Saves all changes since the last commit or rollback operation.

Link copied to clipboard
abstract fun rollback()

Reverts all changes since the last commit or rollback operation, or to the last set savepoint, if applicable.