Ash.Sort.parse_input

You're seeing just the function parse_input, go back to Ash.Sort module for more information.
Link to this function

parse_input(resource, sort)

View Source

Specs

parse_input(
  Ash.Resource.t(),
  String.t()
  | [atom() | String.t() | {atom(), sort_order()} | [String.t()]]
  | nil
) :: t() | nil

A utility for parsing sorts provided from external input. Only allows sorting on public attributes and aggregates.

The supported formats are:

Sort Strings

A comma separated list of fields to sort on, each with an optional prefix.

The prefixes are:

  • "+" - Same as no prefix. Sorts :asc.
  • "++" - Sorts :asc_nils_first
  • "-" - Sorts :desc
  • "--" - Sorts :desc_nils_last

For example

"foo,-bar,++baz,--buz"

A list of sort strings

Same prefix rules as above, but provided as a list.

For example:

["foo", "-bar", "++baz", "--buz"]

A standard Ash sort