Filterable v0.5.3 Filterable View Source

Filterable allows to map incoming parameters to filter functions.

This module contains common functions (apply_filters/3, filter_values/2) which allow to run filters in simple functional Elixir way and filterable macro which allows to build filters using DSL (see Filterable.DSL)

Link to this section Summary

Link to this section Functions

Link to this function apply_filters(queryable, params, module, opts \\ []) View Source
apply_filters(any, map | Keyword.t, module, Keyword.t) ::
  {:ok, any, map} |
  {:error, String.t}
Link to this function apply_filters!(queryable, params, module, opts \\ []) View Source
apply_filters!(any, map | Keyword.t, module, Keyword.t) ::
  any |
  no_return
Link to this macro define_module(module, list) View Source (macro)
Link to this function filter_values(params, module, opts \\ []) View Source
filter_values(map | Keyword.t, module, Keyword.t) ::
  {:ok, map} |
  {:error, String.t}
Link to this macro filterable(arg, opts \\ []) View Source (macro)