How do people typically divide up their schema vs ...
# squarelibraries
c
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
Yep one .sq file for each table and its queries is what we use too
c
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
yeah that sounds weird. I'm not sure why someone would maintain multiple schemas. 😯