# `BoxTurtle.Schema.Sort.API`
[🔗](https://github.com/twajjo/box_turtle/blob/v0.1.0/lib/schema/sort/api.ex#L1)

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

# `sort_spec`

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

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

# `sort_by`

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
