Repository navigation
feat: write transactions (minigraf#824) - #26
Merged
Merged
Conversation
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
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.
Write transactions for this binding (project-minigraf/minigraf#824): the shared UniFFI shim, plus
Minigraf.txOptions()(builder) and Kotlindb.beginWrite(options); the generatedclose()(AutoCloseable /use) rolls back unless committed.TransactionTest.kt, a Java interop test, a consumer-contract test, README section injava/README.md.Behaviour follows core's
OwnedWriteTransaction: a staged write returns{"ok":true}, queries read the staged state, a failed statement stages nothing;commitapplies everything as one transaction,rollbackdiscards it; a finished transaction'sexecute/commitare 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