withTransactionCommitOrRollback
suspend fun <SqlConnectionT : SqlConnection, T> DatabaseClient<SqlConnectionT>.withTransactionCommitOrRollback(function: suspend (DatabaseClient<SqlConnectionT>) -> Option<T>): Option<T>(source)
Deprecated
Use `withTransactionEither` instead.
Replace with
this.withTransactionEither { function(it).toEither {} }.getOrNone()Content copied to clipboard
Parameters
function
return Some to commit the transaction, or None to roll back the transaction.