-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
Ionic 3: Update SQLite documentation #15584
Comments
I don't know if you're aware but you can make ionic-storage use SQLite when running on actual devices by simply adding the SQLite plugin. From the docs: "When running in a native app context, Storage will prioritize using SQLite, as it's one of the most stable and widely used file-based databases, and avoids some of the pitfalls of things like localstorage and IndexedDB, such as the OS deciding to clear out such data in low disk-space situations. First, if you'd like to use SQLite, install the cordova-sqlite-storage plugin: ionic cordova plugin add cordova-sqlite-storage" |
@torsorensen I know it. It's not that what I'm talking about. With SQLite you can send queries to the DB and receive a filtered set of records. But with ionic-storage you only have a key-value style of saving and retrieving objects. |
Actual Ionic Native issues live here: https://github.com/ionic-team/ionic-native/issues/ |
try changing the {} to [] |
Thanks for the issue! We have moved the source code and issues for Ionic 3 into a separate repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there. Thank you for using Ionic! |
Issue moved to: ionic-team/ionic-v3#116 |
Bug Report
Ionic Info
Describe the Bug
Following the SQLite plugin usage instructions found at https://ionicframework.com/docs/native/sqlite/ drives to an error.
Steps to Reproduce
Started a new project with
ionic start sqlitetest blank
.Followed the instructions found in the documentation mentioned before and added this code to the default
home.ts
:Executed
ionic cordova emulate android -lc
and got a typescript error:Related Code
I tried removing that offending parameter
{}
since it's optional. I executed it again and got these log messages:Finally, I tried to change that parameter to
[]
, uninstalled the app, redeployed it, and it worked:Expected Behavior
The documentation is obsolete and I think SQLite is a pretty important plugin so it should be updated.
Additional Context
I'm opening this issue because I started a project before and I couldn't make SQLite work, so finally I had to change my app to use
ionic-storage
instead, despite its way of working isn't optimal for the application I'm currently developing. Please, update the documentation so no other programmer has the same problem I had.The text was updated successfully, but these errors were encountered: