# TransactionInterface

interface TransactionInterface

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

#### Inheritors

Transaction

## Properties

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

The database connection used by the transaction.

db
Link copied to clipboard
abstract val db: Database

The database on which the transaction tasks are performed.

outerTransaction
Link copied to clipboard
abstract val outerTransaction: Transaction?

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

readOnly
Link copied to clipboard
abstract val readOnly: Boolean

Whether the transaction is in read-only mode.

transactionIsolation
Link copied to clipboard
abstract val transactionIsolation: Int

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

## Functions

close
Link copied to clipboard
abstract fun close()

Closes the transaction and releases any savepoints.

commit
Link copied to clipboard
abstract fun commit()

Saves all changes since the last commit or rollback operation.

rollback
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.