Skip to main content

Module hooks

Module hooks 

Source
Expand description

Session hooks — before/after interception for queries and commits.

Hooks allow cross-cutting concerns (audit logging, authorization, metrics) to be injected into the query and commit lifecycle without modifying individual query call sites.

Structs§

BuiltinHookPlugin
Wraps a legacy SessionHook in a Plugin so the host can install it through Uni::add_plugin. The wrapped hook is registered via LegacyHookAdapter so it participates in the phased uni_plugin::SessionHook dispatch chain.
CommitHookContext
Context passed to commit hooks.
HookContext
Context passed to query hooks.
LegacyHookAdapter
Adapter: wraps a legacy SessionHook so it satisfies the phased uni_plugin::traits::hook::SessionHook contract and can be registered through uni_plugin::PluginRegistrar::hook.

Enums§

QueryType
The type of query being executed.

Traits§

SessionHook
Trait for session lifecycle hooks.