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:
2026-09-30 22:46:46 +02:00
parent 97bcb44fdc
commit ed457eb14a
8 changed files with 611 additions and 227 deletions
+5
View File
@@ -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