Laurent Thiebaud
10/16/2023, 3:00 PMcontext(Transaction?)
fun doStatementReuseOrCreateTransaction(statement: suspend Transaction.() -> Unit) {
if (this@Transaction == null) {
openTransaction {
statement()
}
} else statement()
}
However as soon as I make the context optional (with the ?
) then intellij is lost and doesn't understand this@Transaction
anymore
is there any way to make it work?dave
10/16/2023, 3:10 PMLaurent Thiebaud
10/16/2023, 3:12 PMdave
10/16/2023, 3:17 PM