Back to Exposed

Companion

docs/api/exposed-jdbc/org.jetbrains.exposed.v1.jdbc.transactions/-transaction-manager/-companion/index.html

1.2.03.5 KB
Original Source

Companion

object Companion

Members

Properties

defaultDatabase

Link copied to clipboard

var defaultDatabase: Database?

The database to use by default in all transactions.

manager

Link copied to clipboard

val manager: JdbcTransactionManager

Returns the JdbcTransactionManager for the current context.

primaryDatabase

Link copied to clipboard

val primaryDatabase: Database?

The currently active database, which is either the default database or the last instance created. Returns null if no database has been registered.

Functions

closeAndUnregister

Link copied to clipboard

@Synchronized

fun closeAndUnregister(database: Database)

Clears any association between the provided database and its TransactionManager, and ensures that the database instance will not be available for use in future transactions.

current

Link copied to clipboard

fun current(): JdbcTransaction

Returns the current JdbcTransaction.

currentOrNew

Link copied to clipboard

fun currentOrNew(isolation: Int = manager.defaultIsolationLevel): JdbcTransaction

Returns the current JdbcTransaction, or creates a new transaction with the provided isolation level.

currentOrNull

Link copied to clipboard

fun currentOrNull(): JdbcTransaction?

Returns the current JdbcTransaction, or null if none exists.

managerFor

Link copied to clipboard

fun managerFor(database: Database): JdbcTransactionManager

Returns the JdbcTransactionManager instance associated with the provided database.

registerManager

Link copied to clipboard

@Synchronized

fun registerManager(database: Database, manager: JdbcTransactionManager)

Associates the provided database with a specific manager.

Generated by Dokka © 2026 Copyright