Agustín Ponce
06/18/2025, 5:05 PMYassine Abou
06/19/2025, 2:16 PMAgustín Ponce
06/19/2025, 5:05 PMIllegalStateException: The driver used with SQLDelight is asynchronous, so SQLDelight should be configured for
asynchronous usage:
sqldelight {
databases {
MyDatabase {
generateAsync = true
}
}
}
I have the database configured as Async in the build.gradle
, but I see that some of the generated methods are not marked with suspend
(especially the SELECT *
ones), and I don't know what else to look at anymoreYassine Abou
06/19/2025, 5:15 PM.synchronous()
when initializing the driver? For example, in this code:
val platformModule = module {
single {
val driver = AndroidSqliteDriver(
schema = LlmsDatabase.Schema.synchronous(),
context = MyApp.getContext(),
name = "LlmsDatabase.db"
).apply {
enableForeignKeys()
}
LlmsDatabaseWrapper(driver, LlmsDatabase(driver))
}
}
Agustín Ponce
06/19/2025, 5:17 PMYassine Abou
06/19/2025, 5:25 PMAgustín Ponce
06/20/2025, 7:35 AMexecuteAs
calls to awaitAs
. It's working fine now!bod
06/20/2025, 8:00 AM