StatementPreparationExposedTransactionProvider

Provider interface for creating and managing Exposed transactions used for SQL statement preparation.

This abstraction allows for different strategies of providing transactions:

  • Database-based: creates a new transaction for each call (traditional approach)

  • Transaction-based: reuses a single JDBC transaction for better performance

See also

Inheritors

Functions

Link copied to clipboard
abstract fun <T> statementPreparationExposedTransaction(block: Transaction.() -> T): T

Executes the given block within an Exposed transaction context suitable for SQL statement preparation.

abstract fun <T> withExplicitOnlyStatementPreparationExposedTransaction(block: Transaction.() -> T): T

Executes the given block within an Exposed transaction context suitable for SQL statement preparation, without storing the transaction in ThreadLocal or coroutine context.