Skip to content

Update sqlite3 and sqlite3_web, deprecate flush parameter#153

Open
simolus3 wants to merge 3 commits into
mainfrom
update-sqlite-web
Open

Update sqlite3 and sqlite3_web, deprecate flush parameter#153
simolus3 wants to merge 3 commits into
mainfrom
update-sqlite-web

Conversation

@simolus3

@simolus3 simolus3 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

This updates sqlite3 and sqlite3_web dependencies. We benefit from two updates here:

  1. sqlite3 version 3.3.0 and sqlite3_web version 0.9.3 improve IndexedDB support. Instead of starting an IndexedDB transaction asynchronously after the first write to the VFS, the packages now batch writes until the end of a useLock call before commiting them in a single transaction. This improves reliability (there's no way we end up committing in the middle of a SQLite write), performance (single transaction instead of one per file), and allows us to deprecate the flush option here (since that is now fast enough to happen unconditionally).
  2. Version 3.4.0 (or 0.9.4 of sqlite3_web) improve how values are bound to prepared statements and how they're read from SQLite. Previously, we'd map them to Dart objects as an intermediate layer before converting them to JavaScript values. Now, we can directly map JavaScript values to parameters and result columns to JavaScript. This fixes an (arguably obscure) type issue around numeric types. Because the worker is compiled to JavaScript, it can't tell 3 (an integer) apart from 3.0 (a double), but SQLite sure can (through sqlite3_bind_double and sqlite3_bind_int64). By letting clients tag the value they intended to set and using that to bind values without an intermediate Dart num object, we can now preserve these number types correctly. This is only observable from dart2wasm-compiled apps, or from Kotlin once we start using the Dart web worker there.

@simolus3
simolus3 requested a review from Chriztiaan July 14, 2026 11:56
@simolus3
simolus3 requested a review from LucDeCaf July 21, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant