Back to Exposed

SuspendStatementInterceptor

docs/api/exposed-r2dbc/org.jetbrains.exposed.v1.r2dbc.statements/-suspend-statement-interceptor/index.html

1.2.04.7 KB
Original Source

SuspendStatementInterceptor

interface SuspendStatementInterceptor

Represents the processes that should be performed during a statement's lifecycle events in a suspend transaction.

In general, statement execution flow works in the following way:

  1. beforeExecution of the statement

  2. Creation of the prepared statement

  3. afterStatementPrepared using the prepared statement from step 2

  4. Execution of the SQL query

  5. afterExecution

Inheritors

GlobalSuspendStatementInterceptor

Members

Functions

afterCommit

Link copied to clipboard

open suspend fun afterCommit(transaction: R2dbcTransaction)

Performs steps after a transaction is committed.

afterExecution

Link copied to clipboard

open suspend fun afterExecution(transaction: R2dbcTransaction, contexts: List<StatementContext>, executedStatement: R2dbcPreparedStatementApi)

Performs steps after an executedStatement, from the provided contexts, is complete in transaction.

afterRollback

Link copied to clipboard

open suspend fun afterRollback(transaction: R2dbcTransaction)

Performs steps after a rollback operation is issued on a transaction.

afterStatementPrepared

Link copied to clipboard

open suspend fun afterStatementPrepared(transaction: R2dbcTransaction, preparedStatement: R2dbcPreparedStatementApi)

Performs steps after preparedStatement has been created in a transaction, but before the statement has been executed.

beforeCommit

Link copied to clipboard

open suspend fun beforeCommit(transaction: R2dbcTransaction)

Performs steps before a transaction is committed.

beforeExecution

Link copied to clipboard

open suspend fun beforeExecution(transaction: R2dbcTransaction, context: StatementContext)

Performs steps before a statement, from the provided context, is executed in a transaction.

beforeRollback

Link copied to clipboard

open suspend fun beforeRollback(transaction: R2dbcTransaction)

Performs steps before a rollback operation is issued on a transaction.

keepUserDataInTransactionStoreOnCommit

Link copied to clipboard

open fun keepUserDataInTransactionStoreOnCommit(userData: Map<Key<*>, Any?>): Map<Key<*>, Any?>

Returns a mapping of userData that ensures required information is not lost from the transaction scope once the transaction is committed. This function will be called directly ahead of the call to beforeCommit().

Generated by Dokka © 2026 Copyright