Filtrex.Condition.Text (Filtrex v0.5.0)

Copy Markdown View Source

Filtrex.Condition.Text is a specific condition type for handling text filters with various comparisons. There are no configuration options for the date condition.

It accepts the following format (where inverse is passed directly from Filtrex.Condition):

%{
  inverse: boolean,
  column: string,
  comparator: string,  # equals, does not equal, contains, does not contain
  value: string,
  type: "text"
}

Summary

Functions

Callback implementation for Filtrex.Condition.comparators/0.

Tries to create a valid text condition struct, calling helper methods from Filtrex.Condition to validate each type. If any of the types are not valid, it accumulates the errors and returns them.

Callback implementation for Filtrex.Condition.type/0.

Types

t()

@type t() :: t()

Functions

comparators()

Callback implementation for Filtrex.Condition.comparators/0.

parse(config, map)

Tries to create a valid text condition struct, calling helper methods from Filtrex.Condition to validate each type. If any of the types are not valid, it accumulates the errors and returns them.

type()

Callback implementation for Filtrex.Condition.type/0.