electrolobzik
02/08/2024, 1:58 PMactual class DriverFactory(private val context: Context) {
actual fun createDriver(): SqlDriver {
return AndroidSqliteDriver(Database.Schema, context, "test.db")
}
}
I I am getting an error if I use this code with generateAsync.set(true)
. What is the correct way to use async drivers?Sunil Kumar
02/10/2024, 11:19 AMgenerateAsync.set(true)
actual class DriverFactory(private val context: Context) {
actual fun createDriver(): SqlDriver {
return AndroidSqliteDriver(Database.Schema.synchronous(), context, "test.db")
}
}
You can read more here: https://cashapp.github.io/sqldelight/2.0.1/js_sqlite/multiplatform/#:~:text=src/-,androidMain,-/kotlinelectrolobzik
02/10/2024, 11:50 AM