mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-12 04:10:36 +01:00
Preload Data Functionality #118
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Jan 12, 2017).
Hi,
In my app I have to populate my database with external data. I'm doing that during the app launch. This could take a lot of time, because there are thousands of records returned from the server. To avoid bad UX, making user to wait, I'm preloading data like this:
As you can see I'm repeating the part of your code responsible for getting the default root directory (see:
sqliteStoreDefaultRootDirectory). Is it possible for you to make those methods accessible? Or even better, how about implementing a method which will copy bundled database (.wal and .shm also) to store.@JohnEstropia commented on GitHub (Jan 13, 2017):
Hi, thanks for the feedback!
If you trace the contents of
addStorageAndWait(), you'll find that it just passes a default-initializedSQLiteStore. You can get the actual path from that instance:You can also do it the other way: specify your own path and assign it to
SQLiteStore()@ghost commented on GitHub (Jan 13, 2017):
Thank you very much, I totally missed that!