Docs

Changelog

All notable changes to @devioarts/capacitor-sqlite, following Keep a Changelog. The canonical, always-current file is CHANGELOG.md in the repository.

0.1.1 - 2026-07-12

Added

  • The cross-platform runMany() API for one SQL statement and many value sets — validates every set before the first write, is atomic by default, reuses one prepared statement on Android/iOS/Electron, uses a compact single-SQL request on sqlite-wasm Worker1, returns only aggregate changes by default, and optionally returns per-item changes/row IDs. Existing APIs are unchanged.
  • runMany(10,000) added to the full-load stress profile alongside runBatch(10,000).
  • Expanded regression coverage for bind counts, UPSERT row IDs, query planning, migrations, busy timeout, Electron worker lifecycle, compact query transport, and Android device-reported failures.
  • A separate 24-case performance-diagnostic profile (d-01..d-24) with latency percentiles and controlled comparisons across JS harness cost, platform dispatch, plugin queue/registry, transactional vs. autocommit writes, concurrent bridge throughput, batch/runMany() wrapping, and more. The original full-load profile remains separate and unchanged.

Changed

  • Removed leftover Capacitor-plugin-generator boilerplate test stubs — dead code, never published in the npm package.
  • Excluded dist/docs.json (a docgen intermediate artifact) from the published npm package.
  • Added electron as an optional peer dependency so npm can flag a version mismatch when Electron is present, without warning pure iOS/Android/Web consumers.
  • Documented that a multi-version migrations list is not atomic as a whole (see Migrations), the new UPSERT lastInsertId behavior, and CapacitorSqlite.dispose() for Electron.
  • Transaction documentation now checks every resolved SqliteResult instead of relying on try/catch (see Transactions).

Fixed

  • Cross-platform SQL validation is now consistent. run(), query(), runBatch(), and runMany() reject missing/extra bind values, unsupported placeholders, malformed multi-statement SQL, non-finite native numbers, and other invalid-parameter cases with the expected error codes on every platform.
  • Transaction and lifecycle state is more reliable. Reopening an already-open database applies pending migrations consistently, invalid manual-transaction migration attempts are rejected, OR ROLLBACK resynchronizes mirrored state, Web readonly connections reassert query_only, Android teardown no longer blocks/drops queued calls, and iOS close/open registry races are guarded.
  • lastInsertId is now conservative and portable. UPSERT update paths, WITHOUT ROWID tables, unchanged connection rowids, replacement of the same explicit key, and rowid reuse all return 0; use RETURNING when the exact affected row ID is required.
  • Web parity gaps were closed. Web now enforces the already-open directory contract, sets busy_timeout, and mirrors connection-local rowid state to avoid extra round trips on successful run() calls.
  • Binary and result transport avoid unnecessary object expansion. Android/iOS use a private tagged-base64 BLOB envelope, Electron keeps Uint8Array through structured clone, and Android/iOS/Electron use compact column/value transport internally.
  • Bulk write paths avoid duplicated native work. Transactional runBatch() reuses prepared statements for repeated SQL and validates the full input before the first write.
  • Packaging fixes. The published package now includes android/proguard-rules.pro, generated ESM output is importable by plain Node ESM consumers, and Electron's runMany() compatibility path is covered.

0.1.0 - 2026-07-06

Added

  • A real Web/OPFS CLI suite runner: npm run test:suite:web and npm run test:suite:web:stress.
  • Web runner validation for cross-origin isolation and OPFS availability before executing the suite.
  • Shared suite regression coverage for query() rejecting DML without RETURNING.
  • Explicit SQL trust-boundary documentation (see Platform notes).
  • Native lifecycle cleanup for open database handles on Android and iOS.
  • Cross-platform stress benchmark results for Electron, Web/OPFS, Android, and iOS.
  • GitHub Actions workflows for fast CI and a manually triggered release matrix with retained platform logs.

Changed

  • query() now only accepts result-producing SQL: SELECT, PRAGMA, EXPLAIN, and INSERT/UPDATE/DELETE/REPLACE ... RETURNING.
  • Android SQLite work now runs on a single executor thread to preserve transaction thread affinity.
  • Stress benchmarks now use release-relevant sizes: 10,000 writes, 100,000-row reads, 1 MB large values, and 2 x 10,000-row multi-DB load.
  • iOS Swift implementation was split into smaller helper files for maintainability.

Fixed

  • Fixed query() allowing write DML without result rows on some backends.
  • Fixed Android manual transactions hanging when beginTransaction() and later statements ran on different executor threads.
  • Fixed Android executor resource risk from unbounded cached thread creation.
  • Fixed Android/iOS plugin teardown leaving open database handles until process cleanup.
  • Fixed migration version accepting values above the 32-bit user_version ceiling on Web, Electron, and iOS — Web/Electron previously silently truncated an out-of-range version when writing PRAGMA user_version, which could make a migration re-apply on a later open() without any error surfacing; iOS had no upper bound at all. All four platforms now reject version > 2147483647 up front with MIGRATION_FAILED.
  • Fixed iOS BLOB bind values passed as a plain byte array (number[]) silently clamping an out-of-range byte instead of rejecting it, matching Android and Electron.
  • Fixed the single-statement guard misreading a bare begin or case identifier (e.g. a column named begin) as a trigger-body keyword, which could swallow a following semicolon and let execute() silently run a second statement it should have rejected.
  • Fixed npm run test:suite:web hanging indefinitely on CI after the suite finished, caused by an orphaned headless-Chrome helper process holding an inherited stdio pipe open.

Older releases

0.0.1 and 0.0.2 are tagged in the repository but predate this changelog. See the releases page and CHANGELOG.md for the most current record.

Last updated on July 17, 2026