-
Story
-
Resolution: Done
-
Medium
-
None
-
None
Want to retrieve books that contains pub_year '99' as sub-string of a given value:
//books[contains(@pub_year,'99')
This is a requirement for 2E2.
Some research shows that the correct expression for using the contains() function is like so
<cpsPath expression>( contains[@leafname,' <string-value> '])
To implement this in CPS and fulfill the use case requirements the following restrictions apply:
contains() can only be applied to leaves
If any of them is equals to ,has the sub string for the given value it is considered a match
A/C
cpsPath query can be used to select a dataNode based on a leave contains value
contains() can be used with any data of any type
This function should work for leaves in both yang containers as yang lists
walkthrough code as needed
demo to team
Breakdown of tasks
Update antlr parser to recognize this pattern
Implement required (native) query
Add db-container tests for
filter on string leaf-value
filter on Integer leaf value
Update documentation
demo to team
- mentioned in
-
Page Loading...