Audit Dao
Data Access Object for audit trail operations.
Provides CRUD operations for audit events and chain state management.
Functions
Count total events.
Count events in a time range.
Delete all events.
Delete all events for a specific user.
Delete every event with seq at or below seq.
Get all events ordered by timestamp.
Get chain state.
Get an event by ID.
Get distinct event names with counts.
Get events by name.
Get all events for a specific user.
Get events in a time range, ordered by timestamp.
Get a page of events after a sequence number, in chain order.
The newest event in chain order.
Get the most recent event.
Get the oldest event.
Lowest and highest seq among events whose ts is within the range; both null if none.
Insert a new audit event.
Atomic insert of event and chain state update.
Atomic prune: record the prune point in state, then delete through state.prunedThroughSeq.
Insert or update chain state.