Colton Idle
07/29/2023, 3:31 PMDatabase.Schema.create(driver)
which was just because my android code didn't have that. wonder why i need that on the jvm but not android?
4. in android land i know that its typically good to only keep one database object around as a singleton that DI'd everywhere. in the case of SQLDelight, I'm not sure what I should keep as singletons. There's the Driver
, Database
and *Queries
. any tips on that?Colton Idle
07/29/2023, 3:32 PMColton Idle
07/29/2023, 3:33 PMkevin.cianfarini
07/29/2023, 3:42 PMkevin.cianfarini
07/29/2023, 3:45 PMDatabase
into my classes and not the query classes themselves.curioustechizen
07/29/2023, 3:49 PMJavier
07/29/2023, 4:39 PMJavier
07/29/2023, 4:40 PMprivate val module = module {
single<SqlDriver> { AndroidSqliteDriver(PokemonDatabase.Schema, get(), "pokemon.db") }
single<PokemonDatabase> { PokemonDatabaseFactory(get(), get()).create() }
...
}