Added Tx common.Database to hooks

This commit is contained in:
Hein
2025-12-12 09:45:44 +02:00
parent 31ad217818
commit 2f18dde29c
4 changed files with 61 additions and 0 deletions

View File

@@ -56,6 +56,10 @@ type HookContext struct {
Abort bool // If set to true, the operation will be aborted
AbortMessage string // Message to return if aborted
AbortCode int // HTTP status code if aborted
// Tx provides access to the database/transaction for executing additional SQL
// This allows hooks to run custom queries in addition to the main Query chain
Tx common.Database
}
// HookFunc is the signature for hook functions