You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bound-parameter limits: chunk IN lists and multi-row inserts #57
D1 allows 100 bound parameters per statement. SQLite allows 32,766 by default. We want the dialect capability to carry this limit, and the builder to split work that exceeds it, or refuse it with a clear error.
Why (MyRemotely)
20 createMany call sites. Some insert hundreds of rows (passcode generation, imports from Rentvine).
Many id IN (...) reads with long id lists.
Today a large statement fails at the server. The failure comes late and the error is vague.
Proposed shape
insertInto(T).values(rows): the dialect splits it into N statements. They run in one batch or one transaction, so the write stays atomic.
inArray(col, ids) with more ids than the limit: compile error by default. chunked opt-in runs N queries and joins the decoded rows.
QueryBuilderError with reason TooManyParameters and the count.
Part of #52: the CAFE-stack roadmap signal from MyRemotely. This shows the direction we want, and it is not a demand. We can send a PR if you accept the idea.
Partly addressed by #119: d1Dialect carries D1's 100-binding limit (sqliteDialect: 32,766), and a statement over it fails at compile time with a QueryBuilderError naming the count, not at the server. Splitting long IN lists and multi-row inserts into several statements is still open.
Activity
Makisuo commentedon Oct 25, 2026
Partly addressed by #119:
d1Dialectcarries D1's 100-binding limit (sqliteDialect: 32,766), and a statement over it fails at compile time with aQueryBuilderErrornaming the count, not at the server. Splitting longINlists and multi-row inserts into several statements is still open.