-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepopulated database documentation fix [options] #26
Comments
I would also favor the following added option (just discovered and added above):
|
+1 for this
In general, I'd agree, and this feels like the most 'natural' and obvious solution for the majority of use cases. But there are times (as the discussion in driftyco/ionic-native#881 ) when using a pre-populated database makes sense. |
Now options 5/6/7 (I just discovered option 7).
Agreed.
Not anymore, thanks to the discussion in danielsogl/awesome-cordova-plugins#881. This will be documented when I make the next cordova-sqlite-storage release. @cocowalla your point does make sense and I will update the documentation of cordova-sqlite-storage to reflect this (along with some other items in #26). From danielsogl/awesome-cordova-plugins#881 (comment):
Got it. So far I had only supported option 1 which does need cordova-sqlite-ext. The discussion in danielsogl/awesome-cordova-plugins#881 basically expanded the definition which I am now happy to accept and support in the documentation. To address a couple more points in danielsogl/awesome-cordova-plugins#881 (comment):
Agreed, and this is the original reason why I had supported option 1 in
The samples in danielsogl/awesome-cordova-plugins#881 do not address the Windows platform. Due to this discussion I am now thinking to put cordova-sqlite-ext into a "legacy maintenance" (deprecated) status and make a pure JavaScript replacement for option 1 (using cordova-plugin-file). |
From discussion in danielsogl/awesome-cordova-plugins#881 there seems to be a bit of confusion about prepopulated databases. In general I can think of the following options:
The createFromLocation option discussed in option 1 will only work in cordova-sqlite-ext (and certain other evplus and FUTURE TBD cordova-sqlite-evcore-extbuild-free). The other options will work in all sqlite plugin versions.
In case of options 3 and 4 the proper database location is platform dependent. I will raise an issue on cordova-sqlite-storage to add a function to get the platform dependent database directory path.
I would personally favor options 5, 6 and 7 since they would work the cleanest. The downside is that there are issues with large batches that are solved in cordova-sqlite-evcore and cordova-sqlite-evplus plugin versions, with GPL or commercial license options.
ADDITIONAL NOTES:
I can think of 2 major pre-populated database scenarios:
In general it would be much better if storesafe/cordova-sqlite-storage#212 (CREATE database if it does not exist should be optional) would be resolved in the near future.
The text was updated successfully, but these errors were encountered: