Docs

@devioarts/capacitor-sqlite

@devioarts/capacitor-sqlite is a SQLite plugin for Capacitor that gives iOS, Android, Web, and Electron apps one JavaScript API for schema migrations, parameterized queries, batch writes, and manual transactions over a real SQLite database.

It is for Capacitor app developers who need local relational storage — offline data, caches, sync queues, or structured app state — without embedding a different SQLite wrapper per platform.

Platforms

Platform Engine Minimum version
iOS SQLite3 (system library) iOS 15
Android SQLiteDatabase (Android framework) API 24
Web @sqlite.org/sqlite-wasm over OPFS SharedArrayBuffer/COOP+COEP; Safari 17+
Electron Node's built-in node:sqlite, off the main process Electron 40+ (Node 24+)

What it does

  • Schema migrations driven by PRAGMA user_version — each version runs in its own transaction.
  • Parameterized run(), query(), and DDL/bulk execute().
  • runBatch() for mixed-SQL bulk writes and runMany() for one repeated statement over many value sets, both in a single native call.
  • Manual transaction control: beginTransaction() / commitTransaction() / rollbackTransaction().
  • In-memory databases via ':memory:'.
  • Every method resolves to a typed SqliteResult — it never rejects, so failures are always inspectable as data.

What it does not do

  • No encryption (no SQLCipher or similar at-rest encryption).
  • No JSON import/export helpers or sync tables.
  • No SQL sandboxing — statement text is trusted application code, not a boundary for user-authored SQL. See SQL trust boundary.

Where to go next

Last updated on July 17, 2026