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:
@@ -44,7 +44,7 @@ For Postgres, use `dbx.DialectPostgres` and blank-import `dbxp` instead of `dbxm
|
||||
|------|-----------|
|
||||
| Query | `Fetch`, `MustFetch`, `FetchOne`, `MustFetchOne`, `Query`, `MustQuery` (+ `*Context` variants) |
|
||||
| Mutations | `Insert`, `InsertReturning`, `Update`, `UpdateAffected`, `UpdateOne`, `UpdateReturning`, `Delete`, `DeleteAffected` (+ `*Context` variants) |
|
||||
| Transactions | `WithTx` |
|
||||
| Transactions | `WithTx`, `WithTxValue` |
|
||||
| Columns | `NormalCols`, `ContainsCol`, `ExprValues`, `ExprStringers` |
|
||||
| Partial update | `ApplyPtr`, `ApplyComplexPtr`, `ApplyInterfacePtr`, `ApplyVal` |
|
||||
| Pointers | `Ptr`, `Val`, `NowPtr`, `TrimPtr`, `TrimPtrToNil`, `IsZero` |
|
||||
|
||||
Reference in New Issue
Block a user