SimpleFilters (simple_filters v1.1.0)

Macros for applying filters to ecto queries.

Summary

Functions

Cuts the operator part from a string, so that it can be put in a query.

Filters for a boolean a value.

Filters for a string using ilike.

Gets the column from opts or name

Parses a value to an integer, converting it when necessary.

Functions

Link to this function

cut_operator(string)

@spec cut_operator(string :: String.t()) :: String.t()

Cuts the operator part from a string, so that it can be put in a query.

Link to this macro

filter_boolean(name, bindings, table)

(macro)

Filters for a boolean a value.

Link to this macro

filter_date(name, bindings, table, opts \\ [])

(macro)
Link to this macro

filter_like(name, bindings, table, opts \\ [])

(macro)

Filters for a string using ilike.

Link to this macro

filter_list(name, bindings, table, opts \\ [])

(macro)
Link to this macro

filter_range(name, bindings, table)

(macro)
Link to this macro

filter_string(name, bindings, table, opts \\ [])

(macro)
Link to this function

get_column(name, opts)

Gets the column from opts or name

Link to this function

parse_integer(value)

@spec parse_integer(value :: String.t() | integer()) :: integer()

Parses a value to an integer, converting it when necessary.