Hey everyone, small question about using SQLDeligh...
# multiplatform
t
Hey everyone, small question about using SQLDelight in a multiplatform app. Are there scenario’s where the SQLite DB can get corrupted? If so, I understand that the Android driver in SQLDelight deletes the db file automatically, but does anyone know if the Native driver has this same behaviour (on iOS)?
a
I recommend asking in #squarelibraries
t
Thanks! Will try that!
k
I wrote the driver (mostly). Sqlite corruption is pretty uncommon, unless you have a hardware error or are directly doing something to the files (copy from a resource, etc). IIRC there's no default from the native driver, just an exception. The android driver gives you an interface you can implement to handle that case. If that was something people really wanted, it could be added, but I wouldn't default to deleting. That's nightmare fuel. IMHO, of course 🙂
t
Thanks @kpgalligan ! I think that answers my question. 🙂 I do wonder what happens IF it happens to one of my users in the future, they would be forced to reinstall the app, which would be pretty terrible. Maybe just to cover that case, a delete option would be nice, maybe I’ll put in a feature request!