How can I save my database to a user file when using SQLDelight?
I plan to have the working database saved inside AppData folder (for crash recovery etc.) and when the user requests it, copy the database to the save path to implement save operation.
s
saket
06/10/2023, 3:07 PM
I'm afk but there is a database folder inside
context.filesDir
that you can copy
a
adte
06/10/2023, 3:15 PM
Thanks! Sorry, I meant on desktop. e.g. on Windows I'm not sure I can copy the db file while it's being used. I know SQLite has a backup API that can be used for that but I read that SQLDelight doesn't support it
s
saket
06/10/2023, 3:16 PM
iteresting, i'm not very familiar with this. can you share more details about the backup api?