View Source Seeker.Sort (seeker v0.2.0)
Sort implementation for Seeker
.
Summary
Functions
Adds order statements to the ecto query based on the s
param.
Returns the s
param key in the connection params. It tries
to find it by using the string or atom key.
Functions
@spec call(Ecto.Query.t(), String.t()) :: Ecto.Query.t()
Adds order statements to the ecto query based on the s
param.
Parameters
- scope: Ecto.Query [Ecto query struct]
- sorts: String [Sort param string]
Examples
iex> call(scope, sorts)
%Ecto.Query{}
Returns the s
param key in the connection params. It tries
to find it by using the string or atom key.
Parameters
- params: Map [Plug.Conn params]
Examples
iex> params(%{"s" => "name+asc"})
"name+asc"