A Cordova plugin that enables NanoSQL to use native SQLite on iOS/Android while falling back to IndexedDB/WebSQL in the browser with the same API. Version 1.7.0 is the latest stable release. It provides full TypeScript support, an ORM, runtime type casting, undo/redo, and supports standard RDBMS queries like joins, groupby, and ordering. Differentiators include seamless cross-platform testing and a unified API for browser and device, unlike other SQLite plugins that require separate APIs.
npm install cordova-plugin-nano-sqliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates setting up a model and connecting with SQLite mode, then performing a simple upsert and select.
Downgrade cordova-sqlite-storage to 2.2.1 or update to latest cordova-plugin-nano-sqlite.
Use ES module imports: import { getMode } from 'cordova-plugin-nano-sqlite/lib/sqlite-adapter';Always include mode: getMode() (or window.nSQLite.getMode() for script tags) in .config().
Use document.addEventListener('deviceready', ...) before connecting.Import getMode from 'cordova-plugin-nano-sqlite/lib/sqlite-adapter'.
Ensure plugin is installed and wait for 'deviceready' event before accessing nSQLite.
Use import { getMode } from 'cordova-plugin-nano-sqlite/lib/sqlite-adapter';Add mode: getMode() (or window.nSQLite.getMode()) in the config object.
Run: cordova plugin add cordova-sqlite-storage --save