mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-10-10 15:26:28 +00:00
feat(tx): run websocketspec and mqttspec operations in per-message transactions
Reads and deletes run in one transaction; create and update write in one and re-fetch plus After hooks in a second. OnTxBegin fires first in each.
This commit is contained in:
@@ -50,6 +50,11 @@ const (
|
||||
|
||||
// BeforeOp fires immediately before every SQL operation (read, create, update, delete)
|
||||
BeforeOp = websocketspec.BeforeOp
|
||||
|
||||
// OnTxBegin fires once, first, inside every transaction the handler opens for a
|
||||
// read/create/update/delete message (including the second short transaction for
|
||||
// post-commit work). hookCtx.Tx is the transaction.
|
||||
OnTxBegin = websocketspec.OnTxBegin
|
||||
)
|
||||
|
||||
// NewHookRegistry creates a new hook registry
|
||||
|
||||
Reference in New Issue
Block a user