FilterOps
Methods
| Method | Description |
|---|---|
all | |
any | |
avg | |
contains | Returns a filter expression that checks whether the property's |
ends_with | Returns a filter expression that checks whether the property's |
first | |
fuzzy_search | Returns a filter expression that performs fuzzy matching |
is_in | Returns a filter expression that checks whether the property |
is_none | Returns a filter expression that checks whether the property |
is_not_in | Returns a filter expression that checks whether the property |
is_some | Returns a filter expression that checks whether the property |
last | |
len | |
max | |
min | |
not_contains | Returns a filter expression that checks whether the property's |
starts_with | Returns a filter expression that checks whether the property's |
sum |
Method Details
all
any
avg
contains
Signature: contains(value)
Returns a filter expression that checks whether the property's string representation contains the given value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Prop | - | Substring that must appear within the value. |
Returns
| Type | Description |
|---|---|
filter.FilterExpr | A filter expression evaluating substring search. |
ends_with
Signature: ends_with(value)
Returns a filter expression that checks whether the property's string representation ends with the given value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Prop | - | Suffix to check for. |
Returns
| Type | Description |
|---|---|
filter.FilterExpr | A filter expression evaluating suffix matching. |
first
fuzzy_search
Signature: fuzzy_search(prop_value, levenshtein_distance, prefix_match)
Returns a filter expression that performs fuzzy matching against the property's string value.
Uses a specified Levenshtein distance and optional prefix matching.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
prop_value | str | - | String to approximately match against. |
levenshtein_distance | int | - | Maximum allowed Levenshtein distance. |
prefix_match | bool | - | Whether to require a matching prefix. |
Returns
| Type | Description |
|---|---|
filter.FilterExpr | A filter expression performing approximate text matching. |
is_in
Signature: is_in(values)
Returns a filter expression that checks whether the property is contained within the specified iterable of values.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
values | list[Prop] | - | Iterable of property values to match against. |
Returns
| Type | Description |
|---|---|
filter.FilterExpr | A filter expression evaluating membership. |
is_none
Returns a filter expression that checks whether the property
value is None / missing.
Returns
| Type | Description |
|---|---|
filter.FilterExpr | A filter expression evaluating value is None. |
is_not_in
Signature: is_not_in(values)
Returns a filter expression that checks whether the property is not contained within the specified iterable of values.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
values | list[Prop] | - | Iterable of property values to exclude. |
Returns
| Type | Description |
|---|---|
filter.FilterExpr | A filter expression evaluating non-membership. |
is_some
Returns a filter expression that checks whether the property
value is present (not None).
Returns
| Type | Description |
|---|---|
filter.FilterExpr | A filter expression evaluating value is not None. |
last
len
max
min
not_contains
Signature: not_contains(value)
Returns a filter expression that checks whether the property's string representation does not contain the given value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Prop | - | Substring that must not appear within the value. |
Returns
| Type | Description |
|---|---|
filter.FilterExpr | A filter expression evaluating substring exclusion. |
starts_with
Signature: starts_with(value)
Returns a filter expression that checks whether the property's string representation starts with the given value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
value | Prop | - | Prefix to check for. |
Returns
| Type | Description |
|---|---|
filter.FilterExpr | A filter expression evaluating prefix matching. |