Filter operators
The base filter operators used by typed filter models.
DefaultFilter
Section titled “DefaultFilter”A base filter model that can be used to create more specific filter models.
| Property | Type | Required | Description |
|---|---|---|---|
operator | EquivalenceOperators | ComparisonOperators | ArrayOperators | StringOperators | RangeOperators | AllOperators | Yes | The operator to apply to the filter value. |
value | unknown | Yes | The value to use for the filter operation. |
{ "operator": "eq", "value": null}$schema: https://json-schema.org/draft/2020-12/schema$id: DefaultFilter.yamltype: objectproperties: operator: anyOf: - $ref: EquivalenceOperators.yaml - $ref: ComparisonOperators.yaml - $ref: ArrayOperators.yaml - $ref: StringOperators.yaml - $ref: RangeOperators.yaml - $ref: AllOperators.yaml description: The operator to apply to the filter value. value: description: The value to use for the filter operation.required: - operator - valuedescription: A base filter model that can be used to create more specific filter models./** A base filter model that can be used to create more specific filter models. */@Versioning.added(Versions.v0_1)model DefaultFilter { /** The operator to apply to the filter value. */ operator: | EquivalenceOperators | ComparisonOperators | ArrayOperators | StringOperators | RangeOperators | AllOperators;
/** The value to use for the filter operation. */ value: unknown;}EquivalenceOperators
Section titled “EquivalenceOperators”Operators that filter a field based on an exact match to a value.
| Value | Description |
|---|---|
eq | Equal to a value. |
neq | Not equal to a value. |
"eq"$schema: https://json-schema.org/draft/2020-12/schema$id: EquivalenceOperators.yamltype: stringenum: - eq - neqdescription: |- Operators that filter a field based on an exact match to a value.
- `eq`: Equal to a value. - `neq`: Not equal to a value./** Operators that filter a field based on an exact match to a value. * * - `eq`: Equal to a value. * - `neq`: Not equal to a value. */@Versioning.added(Versions.v0_1)enum EquivalenceOperators { /** Equal to a value. */ eq,
/** Not equal to a value. */ neq,}ComparisonOperators
Section titled “ComparisonOperators”Operators that filter a field based on a comparison to a value.
| Value | Description |
|---|---|
gt | Greater than a value. |
gte | Greater than or equal to a value. |
lt | Less than a value. |
lte | Less than or equal to a value. |
"gt"$schema: https://json-schema.org/draft/2020-12/schema$id: ComparisonOperators.yamltype: stringenum: - gt - gte - lt - ltedescription: |- Operators that filter a field based on a comparison to a value.
- `gt`: Greater than a value. - `gte`: Greater than or equal to a value. - `lt`: Less than a value. - `lte`: Less than or equal to a value./** Operators that filter a field based on a comparison to a value. * * - `gt`: Greater than a value. * - `gte`: Greater than or equal to a value. * - `lt`: Less than a value. * - `lte`: Less than or equal to a value. */@Versioning.added(Versions.v0_1)enum ComparisonOperators { /** Greater than a value. */ gt,
/** Greater than or equal to a value. */ gte,
/** Less than a value. */ lt,
/** Less than or equal to a value. */ lte,}ArrayOperators
Section titled “ArrayOperators”Operators that filter a field based on an array of values.
| Value | Description |
|---|---|
in | Field's value is one of the supplied values. |
notIn | Field's value is not in the supplied values. |
"in"$schema: https://json-schema.org/draft/2020-12/schema$id: ArrayOperators.yamltype: stringenum: - in - notIndescription: |- Operators that filter a field based on an array of values.
- `in`: Field's value is one of the supplied values. - `notIn`: Field's value is not in the supplied values./** Operators that filter a field based on an array of values. * * - `in`: Field's value is one of the supplied values. * - `notIn`: Field's value is not in the supplied values. */@Versioning.added(Versions.v0_1)enum ArrayOperators { /** Field's value is one of the supplied values. */ in,
/** Field's value is not in the supplied values. */ notIn,}StringOperators
Section titled “StringOperators”Operators that filter a field based on a string value.
| Value | Description |
|---|---|
like | Field matches the supplied pattern (case-insensitive substring or wildcard). |
notLike | Field does not match the supplied pattern. |
"like"$schema: https://json-schema.org/draft/2020-12/schema$id: StringOperators.yamltype: stringenum: - like - notLikedescription: |- Operators that filter a field based on a string value.
- `like`: Field matches the supplied pattern (case-insensitive substring or wildcard). - `notLike`: Field does not match the supplied pattern./** Operators that filter a field based on a string value. * * - `like`: Field matches the supplied pattern (case-insensitive substring or wildcard). * - `notLike`: Field does not match the supplied pattern. */@Versioning.added(Versions.v0_1)enum StringOperators { /** Field matches the supplied pattern (case-insensitive substring or wildcard). */ like,
/** Field does not match the supplied pattern. */ notLike,}RangeOperators
Section titled “RangeOperators”Operators that filter a field based on a range of values.
| Value | Description |
|---|---|
between | Field's value falls within the supplied inclusive range. |
outside | Field's value falls outside the supplied range. |
"between"$schema: https://json-schema.org/draft/2020-12/schema$id: RangeOperators.yamltype: stringenum: - between - outsidedescription: |- Operators that filter a field based on a range of values.
- `between`: Field's value falls within the supplied inclusive range. - `outside`: Field's value falls outside the supplied range./** Operators that filter a field based on a range of values. * * - `between`: Field's value falls within the supplied inclusive range. * - `outside`: Field's value falls outside the supplied range. */@Versioning.added(Versions.v0_1)enum RangeOperators { /** Field's value falls within the supplied inclusive range. */ between,
/** Field's value falls outside the supplied range. */ outside,}AllOperators
Section titled “AllOperators”Union of every filter operator across equivalence, comparison, array, range, and string operators.
| Value | Description |
|---|---|
eq | Equal to a value. |
neq | Not equal to a value. |
gt | Greater than a value. |
gte | Greater than or equal to a value. |
lt | Less than a value. |
lte | Less than or equal to a value. |
in | Field's value is one of the supplied values. |
notIn | Field's value is not in the supplied values. |
between | Field's value falls within the supplied inclusive range. |
outside | Field's value falls outside the supplied range. |
like | Field matches the supplied pattern. |
notLike | Field does not match the supplied pattern. |
"eq"$schema: https://json-schema.org/draft/2020-12/schema$id: AllOperators.yamltype: stringenum: - eq - neq - gt - gte - lt - lte - in - notIn - between - outside - like - notLikedescription: |- Union of every filter operator across equivalence, comparison, array, range, and string operators.
- `eq`: Equal to a value. - `neq`: Not equal to a value. - `gt`: Greater than a value. - `gte`: Greater than or equal to a value. - `lt`: Less than a value. - `lte`: Less than or equal to a value. - `in`: Field's value is one of the supplied values. - `notIn`: Field's value is not in the supplied values. - `between`: Field's value falls within the supplied inclusive range. - `outside`: Field's value falls outside the supplied range. - `like`: Field matches the supplied pattern. - `notLike`: Field does not match the supplied pattern./** Union of every filter operator across equivalence, comparison, array, range, and string operators. * * - `eq`: Equal to a value. * - `neq`: Not equal to a value. * - `gt`: Greater than a value. * - `gte`: Greater than or equal to a value. * - `lt`: Less than a value. * - `lte`: Less than or equal to a value. * - `in`: Field's value is one of the supplied values. * - `notIn`: Field's value is not in the supplied values. * - `between`: Field's value falls within the supplied inclusive range. * - `outside`: Field's value falls outside the supplied range. * - `like`: Field matches the supplied pattern. * - `notLike`: Field does not match the supplied pattern. */@Versioning.added(Versions.v0_1)enum AllOperators { ...EquivalenceOperators, ...ComparisonOperators, ...ArrayOperators, ...RangeOperators, ...StringOperators,}