we would like to bring support for contains operator in cps-path.
...
2.Using SIMILAR TO Regular Expression Keyword :
The only difference between like
and similar to
is to pattern matches the given string. It is similar to LIKE
, except that it interprets the pattern using the SQL standard's definition of a regular expression
SIMILAR TO
supports these pattern-matching metacharacters borrowed from POSIX regular expressions:
|
denotes alternation (either of two alternatives).*
denotes repetition of the previous item zero or more times.+
denotes repetition of the previous item one or more times.?
denotes repetition of the previous item zero or one time.{
m
}
denotes repetition of the previous item exactlym
times.{
m
,}
denotes repetition of the previous itemm
or more times.{
m
,
n
}
denotes repetition of the previous item at leastm
and not more thann
times.Parentheses
()
can be used to group items into a single logical item.A bracket expression
[...]
specifies a character class, just as in POSIX regular expressions.
...
1.Update antlr parser to recognize this pattern
2.Implement required (native) query
3.Add db-container Integration tests for
a.filter on string leaf-value
b.filter on Integer leaf-value
c.filter on leaf-list value
4.Update documentation
5.demo to team
Limitations
1. contains condition is case sensitive.
2. Only leaves can be used, leaf-list are not supported.
3. Only string and integer values are supported, boolean and float values are not supported.
4. When empty value is passed with contains it returns all the nodes that has given leaf element.