code_corps v0.0.1 CodeCorps.Helpers.Query View Source

Link to this section Summary

Link to this section Functions

Link to this function id_filter(query, id_list) View Source
id_filter(Ecto.Queryable.t(), map() | String.t()) :: Ecto.Queryable.t()
Link to this function limit_filter(query, arg2) View Source
Link to this function optional_filters(query, params, list) View Source
optional_filters(Ecto.Queryable.t(), map(), list()) :: Ecto.Queryable.t()

Applies optional filters by key-value to query dynamically.

Used by piping a queryable with a map of parameters and a list of keys to filter by.

For each key in the list, the params map has a value for that key, the query condition for that {key, value} is applied to the queriable.

Link to this function project_filter(query, arg2) View Source
Link to this function slug_finder(query, slug) View Source
Link to this function title_filter(query, arg2) View Source
Link to this function user_filter(query, arg2) View Source