English | 简体中文

api-docs / org.ktorm.database / TransactionManager / newTransaction

newTransaction

abstract fun newTransaction(
    isolation: TransactionIsolation? = defaultIsolation
): Transaction
(source code)

Open a new transaction for the current thread using the specific isolation if there is no transaction opened.

Parameters

isolation - the transaction isolation, by default, defaultIsolation is used.

Exceptions

IllegalStateException - if there is already a transaction opened.

Return
the new-created transaction.