-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-54152 Add usability options to object functions.
Adds the boolean option "exact" to OBJECT_PATHS, OBJECT_FILTER & OBJECT_PAIRS_NESTED as an alternative to specifying the regexp BOL & EOL anchors in the pattern. This is only a usability enhancement allowing things to be less cryptic for those who aren't familiar with regular expressions. OBJECT_FILTER(a,{"pattern":"f000000","patternspace":"field","exact":true}) is the same as OBJECT_FILTER(a,{"pattern":"^f000000$","patternspace":"field"}) but also allows regex=false to match an entire field or path: OBJECT_FILTER(a,{"pattern":"f000000","regex":false,"patternspace":"field","exact":true}) Also add the option "report" with possibile values "field" or "path" to OBJECT_PAIRS_NESTED to help with indexing fields that could appear at any nesting level within an object. Plus adds "ignorecase" option for caseless matching. And adds reporting of composite array elements when "composites" set to true. Change-Id: I55faa72fb395e5bf106507ceaaed0a9290481d34 Reviewed-on: https://review.couchbase.org/c/query/+/181374 Reviewed-by: Marco Greco <marco.greco@couchbase.com> Reviewed-by: Sitaram Vemulapalli <sitaram.vemulapalli@couchbase.com> Tested-by: Donald Haggart <donald.haggart@couchbase.com>
- Loading branch information
Showing
1 changed file
with
152 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters