OuterfacesEctoApi.QueryEngine.QuerySort (Outerfaces Ecto API v0.2.8)
View SourceSummary
Functions
Sorts a query by an association’s field.
Parameters:
- query: The Ecto query.
- binding_list: A list of binding atoms (e.g.
[:organization, :department]).- or binding index
- field: The field to sort on.
- direction: The sort direction (:asc or :desc, default: :asc).
@spec by_field( query :: Ecto.Query.t(), sort_field :: atom(), sort_direction :: :asc | :desc ) :: Ecto.Query.t()
Sorts a query by a given field.
Parameters:
- query: The Ecto query.
- field: The field to sort on.
- direction: The sort direction (:asc or :desc, default: :asc).