Generic query-state model used by views and bindings.
The struct captures the user-controlled parts of collection state in a runtime friendly way, while the query schema provides the allowed search, filter, and sort fields.
Summary
Functions
Builds a runtime query from params and a declared schema.
Merges query params into a path while preserving unrelated params.
Converts query state into Ash read options.
Serializes a runtime query back into URL params.
Updates a query from a named event and params.
Types
@type sort_direction() :: :asc | :desc
@type sort_entry() :: atom() | {atom(), sort_direction()}
@type t() :: %AshSDUI.Query{ default_limit: pos_integer() | nil, default_sort: sort_entry() | [sort_entry()] | nil, filter_fields: [atom()], filters: map(), limit: pos_integer() | nil, name: atom() | nil, offset: non_neg_integer() | nil, params: map(), search: String.t() | nil, search_fields: [atom()], sort: [sort_entry()], sort_fields: [atom()], source: term() }
Functions
Builds a runtime query from params and a declared schema.
Merges query params into a path while preserving unrelated params.
Converts query state into Ash read options.
Serializes a runtime query back into URL params.
Updates a query from a named event and params.