Skip to content

Commit

Permalink
[#5408] [YSQL] Document jsonpath .** accessor with nesting level filter
Browse files Browse the repository at this point in the history
Summary:
Postgres commit was e0e3dad770d3eefc4ee6cd562d9c25b61c263a6e

Commit message was:

    It appears that some variants of .** jsonpath accessor are undocumented.  In
    particular undocumented variants are:

     .**{level}
     .**{lower_level to upper_level}
     .**{lower_level to last}

    This commit adds missing documentation for them.

Test Plan: Build yugabytedb and run test

Reviewers: mihnea, jason

Reviewed By: jason

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D9450
  • Loading branch information
tedyu committed Sep 24, 2020
1 parent 2bca9b5 commit e50b588
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/postgres/doc/src/sgml/json.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,30 @@ SELECT jdoc->'guid', jdoc->'name' FROM api WHERE jdoc @> '{"tags": ["qu
</para>
</entry>
</row>
<row>
<entry>
<para>
<literal>.**{<replaceable>level</replaceable>}</literal>
</para>
<para>
<literal>.**{<replaceable>lower_level</replaceable> to
<replaceable>upper_level</replaceable>}</literal>
</para>
<para>
<literal>.**{<replaceable>lower_level</replaceable> to
last}</literal>
</para>
</entry>
<entry>
<para>
Same as <literal>.**</literal>, but with filter over nesting
level of JSON hierarchy. Levels are specified as integers.
Zero level corresponds to current object. This is a
<productname>PostgreSQL</productname> extension of the SQL/JSON
standard.
</para>
</entry>
</row>
<row>
<entry>
<para>
Expand Down

0 comments on commit e50b588

Please sign in to comment.