Monaca implementation of SQLite - Native via Cordova or Deprecated Web SQL?
So basically like the title says, does Monaca implement local storage database as SQLite using the native implementation via Cordova’s sqlite plugin or does it rely on the deprecated use of Web SQL standard?
The Monaca docs here:
Show that it is SQLite using the deprecated Web SQL standard: window.openDatabase
I would assume Monaca would actually be using Cordova implementation of native SQLite via the plugin but I cannot find it in the plugin manager nor do the docs support the implementation syntax of: window.sqlitePlugin.openDatabase
Either way, what would be the best practice use of SQLite in an app? My fear is to use what is documented (I think deprecated) and then next version have to recode everything when the Cordova plugin implements SQLite in native already.
@munsterlander this is a very good question! I actually didn’t know that Web SQL was deprecated. At the moment, Monaca includes just Web SQL plugin but the native Cordova plugin can be imported with a developer or higher plan and should work without any issue.
We will discuss about integrating the new plugin in Monaca but I cannot say when it will happen.
I don’t think you will have any issue with Web SQL but, of course, it’s better to use the native plugin.