8000 feat: set values (#316) by adityamukho · Pull Request #19 · project-minigraf/minigraf-node · GitHub
[go: up one dir, main page]

Skip to content

feat: set values (#316) - #19

Merged
adityamukho merged 2 commits into
v3from
feat/316-set-values
Oct 24, 2026
Merged

adityamukho merged 2 commits into
v3from
feat/316-set-values

Conversation

@adityamukho
Copy link
Copy Markdown
Contributor

Step 25 of the minigraf#316 plan (PR 4), Node.js.

  • Native bind_value reads { type: 'set', value: [...] }. Elements are plain values or typed value forms; an element in another form (entity, txCount, timestamp, anyValidTime) is API-017, a set inside a set is API-021 (ValueSet::new), and a non-array value is API-017. An unrecognised element or a plain array is a TypeError. This matches BrowserDb (minigraf#753).
  • minigraf.js wraps PreparedQuery.execute/query so a JS Set, including one inside a typed set, becomes the typed form. (napi has no clean instanceof Set check from Rust.)
  • FactValue gains 'set' (value an array of FactValue) for fact records and LogWriter; value_to_json returns arrays; wildcard arms for core's #[non_exhaustive] Value. index.d.ts regenerated.
  • Pin core v3 → 7c8c5540.
  • Tests: typed/JS/empty/duplicate sets in execute and query, equality with a stored set, JSON + fact-record output, LogWriter round trip with sets and API-021, every rejection path. Consumer contract: a set comes back and binds.

25 tests pass locally (laptop: no Node on the bench machine).

🤖 Generated with Claude Code

https://claude.ai/code/session_01TcpoiFyFeQQQELL872LfQF

adityamukho and others added 2 commits October 25, 2026 02:22
A set binds as { type: 'set', value: [...] } or a JS Set (minigraf.js turns
a Set into the typed form, in elements too); elements are plain or typed
value forms, another form is API-017, a nested set API-021. FactValue gains
'set' for fact records and the log writer; execute() returns a set as an
array. Pin core v3 at 7c8c5540.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TcpoiFyFeQQQELL872LfQF
@adityamukho
adityamukho merged commit 570b5c5 into v3 Oct 24, 2026
14 checks passed
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

0