execute

suspend fun <T> execute(transaction: Transaction<T>): T

Executes a Transaction. If the transaction fails due to deadlock, it is retried up to attempts times in total (including the first attempt).

The coroutine is suspended for a delay between each attempt.

The JDBC calls will block the thread the coroutine is scheduled on. This function should therefore be called within a context that uses the Dispatchers.IO dispatcher.

Return

the result returned by Transaction.execute.

Parameters

transaction

the transaction.