Builds composable Ecto queries for audit timelines.
Every helper returns an %Ecto.Query{} and uses occurred_at, id for a
deterministic display order. UUID order is only a tie-breaker; it does not
imply causality.
All helpers accept:
:order-:descby default, or:asc:prefix- optional PostgreSQL schema prefix matching[a-z_][a-z0-9_]*
Invalid values and option containers raise AuditLog.InvalidValueError
before Ecto builds the query.
Summary
Functions
Returns the complete event timeline.
Filters events to the half-open [from, to) time window.
Filters the timeline to one actor.
Filters the timeline to one correlation UUID.
Filters the timeline to one subject.
Functions
@spec all(keyword()) :: Ecto.Query.t()
Returns the complete event timeline.
@spec between(DateTime.t(), DateTime.t(), keyword()) :: Ecto.Query.t()
Filters events to the half-open [from, to) time window.
Both boundaries must be DateTime values and from must be earlier than
to.
@spec for_actor(String.Chars.t(), String.Chars.t(), keyword()) :: Ecto.Query.t()
Filters the timeline to one actor.
The public representation is an explicit application-owned actor type and
identifier. The filter includes and normalizes both values. Invalid values
raise AuditLog.InvalidValueError.
@spec for_correlation( Ecto.UUID.t(), keyword() ) :: Ecto.Query.t()
Filters the timeline to one correlation UUID.
@spec for_subject(String.Chars.t(), String.Chars.t(), keyword()) :: Ecto.Query.t()
Filters the timeline to one subject.
The public representation is an explicit application-owned subject type and
identifier. The filter includes and normalizes both values. Invalid values
raise AuditLog.InvalidValueError.