Skip to content
Source
Sign inSign up
TanStack/db

fix(sqlite): bound subset query parameters by host limit #2000

MergedKyleAMathews(GitHub profile, opens in a new tab)merged 17 commits intomain fromrefs/pull/2000/headmerged by KyleAMathews(GitHub profile, opens in a new tab)

Showing 9 changed files with 227 additions and 4 deletions (loading 6).

x
0 of 9 viewed, 9 left
6 additions and 0 deletions.changeset/fix-sqlite-in-binding-limits.mdAdded
View file
@@ -0,0 +1,6 @@
+---
+'@tanstack/db-sqlite-persistence-core': patch
+'@tanstack/cloudflare-durable-objects-db-sqlite-persistence': patch
+---
+​
+Keep SQLite subset queries within driver binding limits for large `IN` filters and Cloudflare Durable Object transactions.
33 additions and 4 deletionsdocs/contributing/oracle-coverage.mdModified
View file
@@ -299,6 +299,32 @@
that visits unbounded distinct source IDs remains open; this owner needs a
bounded-navigation counter witness once that policy is chosen.
​
+The SQLite core binding-capacity oracle in
+`packages/db-sqlite-persistence-core/tests/sqlite-core-adapter-oracle.test.ts` is a
+bounded owner for issue #1993. The
+[review record](oracle-reviews/issue-1993-sqlite-binding-capacity.md) gives the
+exact executable revision and guide audit. It failed on the original 900-item
+chunking and passes with one JSON table binding per runtime `IN` list and a
+statement-total fallback. It compares independently filtered rows and typed
+values with
+`loadSubset` on real Node prepared SQLite statements. Node versions that expose
+the configured 999-parameter limit use that native cap. Older versions use a
+controlled driver that rejects over-cap bindings before SQLite preparation;
+the oracle tests that guard separately. Fixed and generated cases cover empty lists, 998/999/1000