Represents a sort directive to apply on query results.
Sorts are source-agnostic data structures that describe a column-level ordering. Each source adapter knows how to translate sorts into its native query language (e.g., SQL ORDER BY clauses).
Examples
%Sort{column: "created_at", direction: :desc}
%Sort{column: "name", direction: :asc}
Summary
Functions
Returns a human-readable label for the given direction.
Returns the list of valid direction atoms.
Creates a new sort, validating the direction.
Types
Functions
Returns a human-readable label for the given direction.
@spec directions() :: [direction(), ...]
Returns the list of valid direction atoms.
Creates a new sort, validating the direction.