Filters

Filters are used for reading.

../../_images/ERD_filter.drawio.png

FilterInstance

pydantic model crudcreator.Filter.FilterInstance[source]

Represents a filter instance on a field.

field field_name: str [Required][source]

The name of the field to filter on.

field filter_value: Any [Required][source]

The value to filter with.

field filtration_type: FilterationEnum [Required][source]

How to filter the field?

FilterType

pydantic model crudcreator.Filter.FilterType[source]

An instance of this class represents a filter scheme on a field.

field default: Any = None[source]

What value should be given to the filter if it is not filled in?

field filtration_type: FilterationEnum [Required][source]

How to filter the field?

field force_long_name: bool = False[source]
field is_mandatory: bool [Required][source]

Is the filter mandatory?

FilterationEnum

class crudcreator.Filter.FilterationEnum[source]

Different ways of filtering on a field.

contain: str = 'contain'[source]

Field value must contain filter value.

different_of: str = 'different_of'[source]

Field value must be different from filter value.

equal: str = 'equal'[source]

Field value must match filter value exactly.

max: str = 'max'[source]

The field value must not exceed the filter value.

min: str = 'min'[source]

The value of the field must be at least that of the filter.

pattern: str = 'pattern'[source]

The field value must match the pattern.

% : zero, one or more characters.

_ : one character.