ParsedPredicate
type ParsedPredicate =
| {
name: "IS";
tags: string[];
}
| {
caseSensitive: boolean;
name: "CONTAINS";
property: string;
value: string;
}
| {
name: "EQUALS";
property: string;
value: any;
}
| {
name: "INEQUALITY_OPERATOR";
operator: string;
property: string;
strict: boolean;
value: any;
}
| {
name: "NOT";
predicate: ParsedPredicate;
}
| {
caseSensitive: boolean;
name: "REGEX";
pattern: RegExp;
property: string;
};
Details for a predicate from the OLYMPE query API
Type declaration
{
name: "IS";
tags: string[];
}
name
name: "IS";
Checks if the instance has any of the specified tags.
tags
tags: string[];
An array of tags to check against.
{
caseSensitive: boolean;
name: "CONTAINS";
property: string;
value: string;
}
caseSensitive
caseSensitive: boolean;
Whether the search should be case-sensitive or not.
name
name: "CONTAINS";
Checks if a string type property contains a specific string value.
property
property: string;
The tag of the property being checked.
value
value: string;
The value being searched for.
{
name: "EQUALS";
property: string;
value: any;
}
name
name: "EQUALS";
Checks if a property equals a specific value.
property
property: string;
The tag of the property being checked.
value
value: any;
The value being compared to.
{
name: "INEQUALITY_OPERATOR";
operator: string;
property: string;
strict: boolean;
value: any;
}
name
name: "INEQUALITY_OPERATOR";
Checks if a property is greater than or less than a specific value.
operator
operator: string;
The operator being used in the comparison (e.g. <
, >
).
property
property: string;
The tag of the property being compared.
strict
strict: boolean;
Whether the comparison should be strict (e.g. "<" vs. "<=").
value
value: any;
The value being compared to.
{
name: "NOT";
predicate: ParsedPredicate;
}
name
name: "NOT";
Negates a predicate.
predicate
predicate: ParsedPredicate;
The predicate being negated.
{
caseSensitive: boolean;
name: "REGEX";
pattern: RegExp;
property: string;
}
caseSensitive
caseSensitive: boolean;
Whether the matching should be case-sensitive or not.
name
name: "REGEX";
Checks if a property matches a regular expression pattern.
pattern
pattern: RegExp;
The regular expression pattern being matched.
property
property: string;
The tag of the property being checked.