How do people typically divide up their schema vs queries/inserts/etc with SqlDelight? I'm tempted to just create a MySchema.sq and then one .sq file with crud operations for each table.
s
saket
08/15/2023, 7:14 PM
Yep one .sq file for each table and its queries is what we use too
c
Colton Idle
08/16/2023, 1:43 AM
so when you do something like
val driver: SqlDriver = AndroidSqliteDriver(Database.Schema, context, "test.db")
then the schema includes all of your tables, right? You dont have to do something like
val driver: SqlDriver = AndroidSqliteDriver(listOf(Table1.Schema, Table2Schema), context, "test.db")
I think i read some article in the past week that probably confused me. but okay. one sq file for each table and its queries makes sense.
s
saket
08/16/2023, 8:36 AM
yeah that sounds weird. I'm not sure why someone would maintain multiple schemas. 😯