Repository navigation
feat(prepared): copyable PreparedQuery and browser limit setters (#872) - #883
Merged
Merged
Conversation
… setters (#872) PreparedQuery derives Clone so language bindings, which hold a prepared query behind a shared handle, can return a new prepared object from each limit setter. BrowserPreparedQuery gains withMaxDerivedFacts, withQueryMemoryLimit and withMaxIterations, each returning a new query that keeps the database open. A number at or above usize::MAX means no limit; a negative, fractional or non-finite one is API-017. Part of #862. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2a7QouMzKp3tAWxgVsxRf
This was referenced Nov 10, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Android has no options builder and no Minigraf object: its override list is an OpenOptions field and its defaults a top-level OVERRIDABLE_DEFAULTS. Swift's setters carry their argument labels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H2a7QouMzKp3tAWxgVsxRf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Core part of #872 (refs #872; part of #862). The language bindings can't derive a prepared query with different limits without this.
What changes
PreparedQuery: Clone. Every binding holds a prepared query behind a shared handle, and core's limit setters consumeself. A copy is an independent statement over the same database: a setter applied to one leaves the other unchanged. Test:prepared_query_clone_is_independent(tests/limit_keywords_test.rs).BrowserPreparedQuerysetters.withMaxDerivedFacts(n),withQueryMemoryLimit(bytes)andwithMaxIterations(n)each return a newBrowserPreparedQuerythat keeps the database open, and leave the receiver unchanged. The argument is a non-negative integer JS number. At or above the platform'susize::MAX(2^32 − 1 on wasm32) it means no limit. A negative, fractional or non-finite number throws[API-017].BrowserDbstill takes no options.docs/CONFIGURATION.mdgains a section on which settings every binding exposes, and onBrowserDbtaking no open options. AlsoCHANGELOG.md,docs/TEST_COVERAGE.mdand theCLAUDE.mdtest count.No new error codes. No file-format or query-language change.
Verification
cargo test: 2,112 passed, 0 failed, 21 ignored.--features test-hooks: 2,150 passed, 30 ignored.wasm-pack test --headless --firefox --features browser: 68 passed, 2 of them new (prepared_setters_derive_new_queries,prepared_setters_reject_bad_counts).cargo semver-checks --baseline-rev origin/v3: 223 pass.--profile dist): 1,264,024 B before and after, under the 1,269,760 B limit.The binding PRs follow as drafts pinned to this branch's head. They are re-pinned to the v3 merge commit once this merges.
🤖 Generated with Claude Code
https://claude.ai/code/session_01H2a7QouMzKp3tAWxgVsxRf