Skip to content

v0.1.1

Latest

Choose a tag to compare

@devioarts devioarts released this 12 Jul 13:18
f18af05

Added

  • Added the cross-platform runMany() API for one SQL statement and many value sets. It 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.
  • Added runMany(10,000) to the full-load stress profile next to runBatch(10,000), so the repeated-statement transport gain is visible in normal and quiet in-app benchmark runs instead of only in layer diagnostics.
  • Added shared rm-01..13, iOS native RunManyTests, an Electron worker regression, and diagnostics d-15..24: runMany versus runBatch, pure JS row reconstruction, native BLOB envelope encoding, equivalent payload serialization, Android/iOS native runBatch timing breakdown, concurrent-write fan-out, mixed read/write fan-out, and filtered-query plan comparisons.
  • 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.
  • Added a separate 24-case performance-diagnostic profile (d-01..d-24) with latency percentiles and controlled comparisons for JS harness cost, platform dispatch, plugin queue/registry, minimal SQL, transactional versus autocommit writes, concurrent bridge throughput, SQLite-heavy single-call work, batch/runMany wrapping, TEXT/BLOB input and output, large-result materialization, pure-JS stage baselines, detailed native Android/iOS batch breakdown, concurrent write/mixed workload breakdowns, and filtered-query plan comparisons. The original full-load profile remains separate and unchanged.

Changed

  • Removed leftover Capacitor-plugin-generator boilerplate test stubs (android/src/test/kotlin/com/getcapacitor/ExampleUnitTest.kt, android/src/androidTest/kotlin/com/getcapacitor/android/ExampleInstrumentedTest.kt) — dead code, never published in the npm package, no functional effect.
  • Excluded dist/docs.json (docgen intermediate artifact, no runtime purpose) from the published npm package.
  • Added electron as an optional peer dependency (peerDependenciesMeta.electron.optional: true) so npm can report a version mismatch when Electron is present without warning pure iOS/Android/Web consumers who never install it.
  • README: corrected the "iOS multi-database scheduling" caveat to state explicitly that Android shares the identical single-thread/single-queue limitation across all open databases (previously only called out for iOS); documented that a multi-version migrations list is not atomic as a whole (a later version's failure leaves earlier versions durably committed); documented the new UPSERT lastInsertId behavior; documented CapacitorSqlite.dispose() for Electron.
  • src/definitions.ts JSDoc for run() updated to document the UPSERT lastInsertId: 0 behavior (source of the generated README API section).
  • Transaction documentation now checks every resolved SqliteResult instead of relying on try/catch; plugin SQL failures resolve with success: false and do not reject Promises.
  • Documentation now describes the shared underlying executor/worker scheduling accurately and specifies live-connection migration, exact anonymous-bind-count, ambiguous-rowid behavior, known bulk-write/fan-out limitations, Web/OPFS autocommit durability cost, mixed read/write serialization, and the need for application indexes on large filtered/sorted queries.

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 relevant invalid-parameter cases with the expected public error codes.
  • 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 return 0; use RETURNING when the exact affected row ID is required. iOS also uses the 64-bit total-changes counter where available.
  • Web parity gaps were closed. Web now enforces the already-open directory contract, sets busy_timeout, mirrors connection-local rowid state to avoid extra successful run() worker round-trips, and resynchronizes that mirror after errors.
  • Binary and result transport no longer do unnecessary object expansion. Android/iOS use a private tagged-base64 BLOB envelope, Electron keeps Uint8Array through structured clone, and Android/iOS/Electron renderer queries use compact column/value transport before reconstructing the public row-object shape in JavaScript.
  • Bulk write paths avoid duplicated native work. Transactional runBatch() reuses prepared statements for repeated SQL, validates the full input before the first write, avoids duplicate bind/metadata passes, and keeps transaction:false semantics unchanged. Repeated SQL analysis now uses bounded caches.
  • Packaging and generated-output issues were fixed. The published package includes android/proguard-rules.pro, generated ESM output is importable by plain Node ESM consumers, and Electron's runMany() metadata/compatibility path is covered.
  • Benchmark and suite reliability improved. Capability skips are explicit, runners report skip counts, Android CDP attaches to the intended WebView, stress tests validate API results and large payload contents, and the full-load matrix keeps its original release-scale counts.