readonlyTx

fun <T> readonlyTx(db: Database? = null, transactionIsolation: Int? = db?.transactionManager?.defaultIsolationLevel, statement: JdbcTransaction.() -> T): T

Executes a read-only database transaction.

Return

the result of statement

Parameters

db

the Database to use, or null for the default database

transactionIsolation

the JDBC transaction isolation level

statement

the transaction body to execute

Type Parameters

T

the return type of the transaction