Skip to content

feat: write transactions (minigraf#824) - #19

Merged
adityamukho merged 3 commits into
v3from
feat/824-binding-transactions
Nov 11, 2026
Merged

adityamukho merged 3 commits into
v3from
feat/824-binding-transactions

Conversation

@adityamukho

@adityamukho adityamukho commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Write transactions for this binding (project-minigraf/minigraf#824): the shared UniFFI shim, plus db.beginWrite(options) (Transactions.kt); use { } rolls back unless committed. Consumer-contract test on the emulator, README section.

Behaviour follows core's OwnedWriteTransaction: a staged write returns {"ok":true}, queries read the staged state, a failed statement stages nothing; commit applies everything as one transaction, rollback discards it; a finished transaction's execute/commit are API-018; commit is always explicit and abandonment rolls back; INT-001 on the begin thread (and inside the transaction's own user functions), other threads' writes and begins wait; rules survive a rollback.

Pinned to 32d71ce0, the v3 merge of project-minigraf/minigraf#885.

Refs project-minigraf/minigraf#824

🤖 Generated with Claude Code

https://claude.ai/code/session_01H2a7QouMzKp3tAWxgVsxRf

adityamukho and others added 3 commits November 11, 2026 06:51
Begin a write transaction, run several transact, retract and query
statements in it with queries seeing what it staged, then commit or
roll back. Built on core's OwnedWriteTransaction, so a transaction
may be used, committed or freed on any thread; the begin thread gets
INT-001 from the database while it is open, other threads wait.
A finished transaction is API-018; abandonment rolls back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2a7QouMzKp3tAWxgVsxRf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2a7QouMzKp3tAWxgVsxRf
Also tests that a transaction keeps its database open after every MiniGrafDb reference is dropped (UniFFI), and runs the transaction and override tests in Node CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H2a7QouMzKp3tAWxgVsxRf
@adityamukho
adityamukho marked this pull request as ready for review November 11, 2026 02:06
@adityamukho
adityamukho merged commit eae34ff into v3 Nov 11, 2026
5 checks passed
@adityamukho
adityamukho deleted the feat/824-binding-transactions branch November 11, 2026 02:25
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