A PouchDB adapter that uses native Cordova SQLite as its backing store, providing persistent local storage for hybrid mobile apps. Version 2.0.8 is current; the package is in maintenance mode with infrequent updates. It supports multiple Cordova SQLite plugins (cordova-sqlite-storage, cordova-plugin-sqlite-2, cordova-plugin-websql) and falls back to WebSQL if no SQLite plugin is detected. The adapter was extracted from PouchDB core in v6.0.0 to simplify configuration. Requires manual registration via PouchDB.plugin() and must be used within the Cordova deviceready event. Key differentiator: native SQLite performance vs. bundled WebSQL, with configurable storage options (location, androidDatabaseImplementation).
npm install pouchdb-adapter-cordova-sqliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to register the adapter with PouchDB and create/open a SQLite database inside Cordova's deviceready event.
Use this adapter plugin with PouchDB v6+.
Call PouchDB.plugin(require('pouchdb-adapter-cordova-sqlite')) before new PouchDB.Wrap PouchDB code in document.addEventListener('deviceready', function() { ... });Set the use_prefix flag as shown in README or switch to non-prefixed names.
Verify window.sqlitePlugin exists or install a SQLite plugin.
Use {adapter: 'cordova-sqlite'} in options.Move PouchDB code inside document.addEventListener('deviceready', ...).Ensure PouchDB.plugin(require('pouchdb-adapter-cordova-sqlite')) is used before creating database.Call PouchDB.plugin(adapter) with the correct adapter module.
Run inside Cordova webview with a SQLite plugin installed.