Repository navigation
feat: prepared-query core for the bindings — API-022/023/024, Entity≡Val(Ref), BrowserDb.prepare (#181) - #738
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x
…) interchangeable (#181) INT-033/034/035 are deprecated (kept registered). An entity slot takes Val(Ref), and value, expression and rule-argument slots take Entity, so a binding can pass a host UUID without knowing the slot's position. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x
Bindings are a JS object of slot name to a plain value (boolean,
number, bigint, string, null) or a typed {type, value} form. A JS value
that is not a bind value is a TypeError; a typed value that does not fit
its type is API-017.
Co-Authored-By: Claude Opus
8000
5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x
…#181) Codex review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
PR 1 of #181 (spec, merged #737; plan, steps 1–8). The binding PRs follow on each binding's
v3branch.Changes
API-022,API-023andAPI-024. They wereINT-033/034/035, with the same messages. The INT codes are deprecated: still registered, never reused. Breaking for callers that matched the INT codes (CHANGELOG).EntityandVal(Ref)fit each other's slots. An entity slot takesVal(Value::Ref(u)), and a value, expression or rule-argument slot takesEntity(u). A binding can pass a host UUID without knowing where its slot is (spec decision 6).BrowserDb.preparereturns aBrowserPreparedQuerywithexecute(bindings)(JSON) andquery(bindings)(BrowserCursor). Bindings are a JS object holding plain values (boolean,number(an integer when whole),bigint, string,null) or{type, value}forms, read bysrc/browser/binds.rswithjs_sys. No new dependencies.Tests. On the bench machine: 1,707 passed / 13 ignored, and 1,723 / 14 with
test-hooks(+4 Rust tests). The CI clippy gate is clean. Browser: 40wasm_bindgen_test(+6), run locally withwasm-pack test --headless --firefox; CI also runs Chrome.Found in passing, not changed here: an expression can't take a
#uuidliteral (PRS-070).[(= ?g :bob)]doesn't match a ref to:bob's entity, although a pattern treats the two as equal. Not filed yet.Codex review: 2 findings, both fixed in 04f0c7e (typed
null/anyValidTimewith a payload is nowAPI-017; added a browserAPI-024test).Docs site: minigraf-docs PR to follow; it merges after this one.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x