Is it possible to use sqldelight with Turso’s <lib...
# squarelibraries
m
Is it possible to use sqldelight with Turso’s libsql? The libsql Android API doesn’t seem they provide any implementation of
SupportSQLiteDatabase
j
You'll have to write your own driver then
m
And so it’s not necessary to provide an implementation of SupportSQLiteDatabase, right? I’d just need to handle the create/upgrade etc (as well as provide driver implementation)?
j
Yep
m
libsql uses the same db file as the Android framework (just a standard local sqlite db file), so I’m thinking a lot of the create/upgrade logic, I already have, can be reused. Would it make sense to open the database using existing logic (SQLiteOpenHelper etc) just so the create/migrations can run, then closing it, then opening with libsql API and proceeding using custom libsql driver?
j
The migration API is very basic
Probably 15-20 LOC
👍 1
I would do it yourself
m
yeah definitely cleaner