feat(tx): add WithTxValue for transactional return values

WithTxValue runs a callback inside a transaction and returns its result,
with rollback on error. Includes tests and documentation updates.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 18:25:08 -07:00
parent fbb9c74aab
commit 08f8387856
5 changed files with 70 additions and 2 deletions
+1
View File
@@ -14,6 +14,7 @@
- `StringKSUID.Equal` / `IsZero`, `BinaryKSUID.Equal` / `IsZero`, and nil sentinel vars for [ApplyInterfacePtr].
- `Query`, `MustQuery`, and `UpdateOne` helpers (+ Context variants).
- `WithTxValue` for transactional functions that return a value.
- Context-aware variants for all query and mutation helpers.
- `Delete`, `DeleteAffected`, `WithTx`, `ContainsCol`, and `CurrentDialect()`.
- Package documentation (`doc.go`), expanded README, and subpackage docs for `dbxm` / `dbxp`.