8000 feat: prepared queries with plain Kotlin/Java bind values (minigraf#181) by adityamukho · Pull Request #18 · project-minigraf/minigraf-java · GitHub
[go: up one dir, main page]

Skip to content

feat: prepared queries with plain Kotlin/Java bind values (minigraf#181) - #18

Merged
adityamukho merged 2 commits into
v3from
feat/181-prepared-ffi
Oct 24, 2026
Merged

adityamukho merged 2 commits into
v3from
feat/181-prepared-ffi

Conversation

@adityamukho
Copy link
Copy Markdown
Contributor

PR 3 (java) of project-minigraf/minigraf#181 (spec §4.2, §5, §7.1; plan steps 11–14).

  • src/lib.rs copied from feat: prepared queries and MiniGrafError::Api (minigraf#181) minigraf-binding-template#7 (prepare, MiniGrafPreparedQuery, MiniGrafBindValue, MiniGrafError::Api); core pin and Cargo.lock at 5f2ba46e (minigraf#738).
  • Kotlin: pq.execute("age" to 30) / pq.query(...) and a public bindValue(name, v). Java: Minigraf.execute(pq, Map) / Minigraf.query(pq, Map), plus Minigraf.entity(UUID), txCount, timestamp and ANY_VALID_TIME. Boolean, the integer types, Float/Double, String, null and UUID bind as they are; any other type throws IllegalArgumentException.
  • Breaking (v3.0.0): API-category errors are MiniGrafException.Api; MiniGrafException.text covers it.
  • Consumer contract: a prepared query run twice with plain values and once with a typed value, each checked for its row. README: a Prepared queries section.

Tests (bench machine, JDK 17): PreparedTest 8/8 (new), JavaInteropTest 3/3 (1 new), and the rest unchanged. The consumer test runs in CI. Codex: one test gap (rows not checked per binding), fixed here and in python#14.

Merge after minigraf-binding-template#7.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x

adityamukho and others added 2 commits October 24, 2026 14:52
…ception.Api (minigraf#181)

Shim from minigraf-binding-template#7 and core pin 5f2ba46e
(minigraf#738). Kotlin: pq.execute("slot" to value) / pq.query(...);
Java: Minigraf.execute(pq, Map) / Minigraf.query(pq, Map), plus
Minigraf.entity/txCount/timestamp/ANY_VALID_TIME. API-category errors
are MiniGrafException.Api.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Urda7FD9CYYoxdeGGJa11x
@adityamukho
adityamukho merged commit 4b234ed into v3 Oct 24, 2026
23 checks passed
@adityamukho
adityamukho deleted the feat/181-prepared-ffi branch October 24, 2026 10:45
Sign up for free 627A 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