Transaction
Class representing a unit block of work that is performed on a database.
Properties
The database connection used by the transaction.
The currently executing statement.
Whether tracked values like statementCount and duration should be stored in statementStats for debugging.
The maximum amount of attempts that will be made to perform this transaction
block.
The maximum number of milliseconds to wait before retrying this transaction
if an SQLException happens.
The minimum number of milliseconds to wait before retrying this transaction
if an SQLException happens.
The parent transaction of a nested transaction; otherwise, null
if the transaction is a top-level instance.
The number of seconds the JDBC driver should wait for a statement to execute in Transaction transaction before timing out. Note Not all JDBC drivers implement this limit. Please check the driver documentation.
The current number of statements executed in this transaction.
A StringBuilder containing string representations of previously executed statements prefixed by their execution time in milliseconds.
The transaction isolation level of the transaction, which may differ from the set database level.
The threshold in milliseconds for query execution to exceed before logging a warning.
Functions
Closes all previously executed statements and resets or releases any used database and/or driver resources.
Executes the provided Statement object and returns the generated value.
Executes the provided Statement object, retrieves the generated value, then calls the specified function body with this generated value as its argument and returns its result.
Executes the provided statement exactly, using the supplied args to set values to question mark placeholders (if applicable).
Provided statements will be executed in a batch. Select statements are not supported as it's impossible to return multiple results.
Creates an ExplainQuery using the EXPLAIN
keyword, which obtains information about a statement execution plan.
Returns the complete string identifier of a column, based on its Table.tableName and Column.name.
Returns the string identifier of a column, based on its Column.name.
Returns the string identifier of a table, based on its Table.tableName and Table.alias, if applicable.
Adds the specified StatementInterceptor to act on this transaction.
Removes the specified StatementInterceptor from acting on this transaction.
Creates table with name "busy" (if not present) and single column to be used as "synchronization" point. Table wont be dropped after execution.
Calls the specified suspending statement, suspends until it completes, and returns the result.