Flop.Filter (Flop v0.10.0) View Source
Defines a filter.
Link to this section Summary
Link to this section Types
Specs
op() :: :== | :!= | :=~ | :<= | :< | :>= | :> | :in | :like | :like_and | :like_or | :ilike | :ilike_and | :ilike_or
Represents valid filter operators.
Operator | Value | WHERE clause |
---|---|---|
:== | "Salicaceae" | WHERE column = 'Salicaceae' |
:!= | "Salicaceae" | WHERE column != 'Salicaceae' |
:=~ | "cyth" | WHERE column ILIKE '%cyth%' |
:<= | 10 | WHERE column <= 10 |
:< | 10 | WHERE column < 10 |
:>= | 10 | WHERE column >= 10 |
:> | 10 | WHERE column > 10 |
:in | ["pear", "plum"] | WHERE column IN ('pear', 'plum') |
:like | "cyth" | WHERE column LIKE '%cyth%' |
:like_and | "Rubi Rosa" | WHERE column LIKE '%Rubi%' AND column LIKE '%Rosa%' |
:like_or | "Rubi Rosa" | WHERE column LIKE '%Rubi%' OR column LIKE '%Rosa%' |
:ilike | "cyth" | WHERE column ILIKE '%cyth%' |
:ilike_and | "Rubi Rosa" | WHERE column ILIKE '%Rubi%' AND column ILIKE '%Rosa%' |
:ilike_or | "Rubi Rosa" | WHERE column ILIKE '%Rubi%' OR column ILIKE '%Rosa%' |
Specs
Represents filter query parameters.
Fields
field
: The field the filter is applied to. The allowed fields can be restricted by derivingFlop.Schema
in your Ecto schema.op
: The filter operator.value
: The comparison value of the filter.