Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

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.


  • Monaca

    @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.