BoxTurtle.Schema.Sort.API behaviour (BoxTurtle v0.1.0)

Copy Markdown View Source

Behaviour for modules that turn a sort specification into order_by clauses. See BoxTurtle.Schema.Sort for the supported specification forms.

Summary

Types

A column, {direction, column}, {direction, [column]}, or a list of those.

Types

sort_spec()

@type sort_spec() ::
  atom() | {atom(), atom() | [atom()]} | [atom() | {atom(), atom() | [atom()]}]

A column, {direction, column}, {direction, [column]}, or a list of those.

Callbacks

sort_by(t, sort_spec)

@callback sort_by(Ecto.Queryable.t(), sort_spec()) :: Ecto.Queryable.t()