Repository navigation
feat: prepared queries with JSON bindings (minigraf#181) - #11
Merged
Merged
Conversation
Core pin 5f2ba46e (minigraf#738). minigraf_prepare,
minigraf_prepared_execute/_query/_last_error/_free. Bindings are a JSON
object of slot name to a plain JSON value or a {type, value} form;
anything else is API-017. minigraf_close empties every prepared query,
so the path reopens; a prepared query used after it fails with API-018.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x
…eview) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x
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 4 (C) of project-minigraf/minigraf#181 (spec §4.2, §5, §6, §7.3; plan step 16).
minigraf_prepare,minigraf_prepared_execute,minigraf_prepared_query,minigraf_prepared_last_error,minigraf_prepared_free;include/minigraf.hregenerated with cbindgen 0.29.2. Core pin andCargo.lockat5f2ba46e(minigraf#738).{}) of slot name totrue/false, a number (an integer with no fraction or exponent, so2vs2.0is preserved), a string,null, or a typed{type, value}form: the fact-record value types, plusentity,txCount(fullu64),timestampandanyValidTime. Anything else isAPI-017.MiniGrafDbkeeps a weak list of its prepared queries, and itsDrop(minigraf_close) empties them before the database drops, so the path reopens. A prepared query used after that fails withAPI-018and must still be freed.tests/c/etl_smoke.candconsumer-test/contract.cboth run a prepared query, and both pass locally. README: the memory contract, API table and bindings format.Codex: 2 findings (
txCountabovei64::MAX, missing API-005–007 tests), both fixed.Found while checking spec §6: an unfreed cursor or fact log already blocks reopening after
minigraf_close. Filed as #10, not fixed here.🤖 Generated with Claude Code
https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x