eygraber
10/13/2025, 10:02 PMtransaction though, because it doesn't like the transaction escaping the thread it is started on, which is what happens with the dispatcher support (newTransaction, execute, and executeQuery use withContext to switch into the proper dispatcher).
Is there any way to hook into the transacter to support this, and if not, is there any chance support for this could get added to SqlDelight?hfhbd
10/13/2025, 10:04 PMeygraber
10/13/2025, 10:05 PMhfhbd
10/13/2025, 10:11 PMeygraber
10/13/2025, 10:12 PMeygraber
10/16/2025, 2:51 PMTransacter.Transaction is used as the return type for newTransaction and TransactionWrapper uses it directly as well. I thought they were using a common interface.
So I guess yeah the only "correct" way to deal with this would be to break the runtime.hfhbd
10/16/2025, 3:03 PMeygraber
10/16/2025, 6:16 PMinterface TransactionContextProvider {
suspend fun <R> withTransactionContext(block: suspend () -> R): R
}
and then updating SuspendingTransacterImpl to check if driver is TransactionContextProvider, and wrapping transactionWithWrapper in driver.withTransactionContext.
It makes the behavior opt-in at the driver level, and puts the onus of implementation details onto the driver.eygraber
10/17/2025, 7:41 AM