External Downloaded database during runtime #4908
Unanswered
CaptnBlubber
asked this question in
Q&A
Replies: 1 comment
-
@CaptnBlubber Did you find a solution for this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need an advise on how to tackle the following situation: I have a database file that gets provided to my application (currently only android but iOS and desktop planned) during runtime via a file download. Currently the mechanism works since I postpone access to any other screens until the database is available. However this approach limits the usage to only one file version as I effectively have to restart the application when there is a need to update the db file.
Ideally I need a mechanism that allows me to lock all incoming requests while updating so I don't serve stale data, kind of like a transaction. Unfortunately there is only the option to close the db via the driver, not a reopen.
Saving it as seperate db and importing all data is not an option since the db is ~200mb and importing would take around 20 minutes. The download itself is compressed in 20mb so file download is rather quick.
Any suggestions how I could approach the problem without an application restart and still serve the sqldelight instance as singleton?
Beta Was this translation helpful? Give feedback.
All reactions