Where is the SQLite adaptor?
Is this article misnamed, or am I missing something?
When you set pouchDB it's using the WebSQL adaptor, not SQLite.
When I made the tutorial I was using a version of PouchDB before 6.0.0. In that version, PouchDB would automatically select the SQLite adapter if you had that installed. Since 6.0.0. this is no longer the case.
I will update the tutorial this week, but in the meantime, have a look at the first comment by Nolan Lawson on the tutorial: http://disq.us/p/1f65qim
Makes sense. Unfortunately, I've yet to see a working Ionic 2 example using the pouchdb-adapter-cordova-sqlite plugin. I gave it a good try but it kept throwing errors about expecting the location to be set - but there was no option exposed to pouchDB to set it.
@andy008 and @ashteya same issue...!!!
The issue can be solved with the official PouchDB developer plugin: cordova-plugin-sqlite-2
No, Pouch has withdrawn built-in support for SQLite. You need an adaptor to connect to the Cordova Plugin, which exists but I could not get to work with Pouch. See https://libraries.io/npm/pouchdb-adapter-cordova-sqlite
The examples are all pre-Ionic 2, and although I got the plug-in to install, when called it complains about various missing parameters which cannot be passed through.
@andy008 I updated the tutorial a few days ago and tested it on iOS and can confirm that it worked. Can you let me know what exactly went wrong for you?
@andy008 yep!, In historical notes they affirm it; Is decoupled from the PouchDB core:
Until PouchDB 6.0.0, PouchDB's regular websql adapter supported the Cordova SQLite Plugin automatically. However, the PouchDB team found this to be confusing, error-prone, and difficult to configure, which is why it was extracted into a separate plugin. You can read details in PouchDB's list of breaking changes.
So what I did I installed pouchdb-adapter-cordova-sqlite and how to plug in SQLite cordova-plugin-sqlite-2, it works for iOS and Android >= API 16.
On the other hand probe with the other suggestion plugins, but I didn't work, only with the one that maintains the developer of PouchDB.
Regards!