Scalar Operators
String operators
Axiom processing language provides you with different query operators for searching string data types.
Below are the list of string operators we support on Axiom processing language.
Note:
The following abbreviations are used in the table below:
- RHS = right hand side of the expression.
- LHS = left hand side of the expression.
Operators with an _cs suffix are case sensitive
The table below shows the list of string operators supported by Axiom processing language:
Operator | Description | Case-Sensitive | Example |
---|---|---|---|
== | Equals | Yes | "aBc" == "aBc" |
!= | Not equals | Yes | "abc" != "ABC" |
=~ | Equals | No | "abc" =~ "ABC" |
!~ | Not equals | No | "aBc" !~ "xyz" |
contains | RHS occurs as a subsequence of LHS | No | parentSpanId contains Span |
!contains | RHS doesn't occur in LHS | No | parentSpanId !contains abc |
contains_cs | RHS occurs as a subsequence of LHS | Yes | parentSpanId contains_cs "Id" |
!contains_cs | RHS doesn't occur in LHS | Yes | parentSpanId !contains_cs "Id" |
startswith | RHS is an initial subsequence of LHS | No | parentSpanId startswith parent |
!startswith | RHS isn't an initial subsequence of LHS | No | parentSpanId !startswith "Id" |
startswith_cs | RHS is an initial subsequence of LHS | Yes | parentSpanId startswith_cs "parent" |
!startswith_cs | RHS isn't an initial subsequence of LHS | Yes | parentSpanId !startswith_cs "parent" |
endswith | RHS is a closing subsequence of LHS | No | parentSpanId endswith "Id" |
!endswith | RHS isn't a closing subsequence of LHS | No | parentSpanId !endswith Span |
endswith_cs | RHS is a closing subsequence of LHS | Yes | parentSpanId endswith_cs Id |
!endswith_cs | RHS isn't a closing subsequence of LHS | Yes | parentSpanId !endswith_cs Span |
in | Equals to one of the elements | Yes | abc in ("123", "345", "abc") |
!in | Not equals to any of the elements | Yes | "bca" !in ("123", "345", "abc") |
in~ | Equals to one of the elements | No | "abc" in~ ("123", "345", "ABC") |
!in~ | Not equals to any of the elements | No | "bca" !in~ ("123", "345", "ABC") |
!matches regex | LHS doesn't contain a match for RHS | Yes | parentSpanId !matches regex g.*r |
matches regex | LHS contains a match for RHS | Yes | parentSpanId matches regex g.*r |
Performance tips
For better performance, when there are two operators that do the same task, use the case-sensitive one.
For example:
- instead of
=~
, use==
- instead of
in~
, usein
- instead of
contains
, usecontains_cs