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()

Parameters

function

return Some to commit the transaction, or None to roll back the transaction.