Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util/json: add AllPathsWithDepth #141871

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

normanchenn
Copy link
Member

Previously, AllPaths within the json package would search the entire JSON document until a leaf is found. This PR adds another function, AllPathsWithDepth which limits how deep into the JSON document to search. This will be helpful for jsonb_path_query, as wildcard accessors ([*]) need to search for all paths one level deep.

Epic: None
Release note: None

@normanchenn normanchenn self-assigned this Feb 21, 2025
Copy link

blathers-crl bot commented Feb 21, 2025

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Previously, `AllPaths` within the `json` package would search the entire
JSON document until a leaf is found. This PR adds another function,
`AllPathsWithDepth` which limits how deep into the JSON document to
search. This will be helpful for `jsonb_path_query`, as wildcard
accessors (`[*]`) need to search for all paths one level deep.

Epic: None
Release note: None
@normanchenn normanchenn force-pushed the norman/json-all-paths-depth branch from 00077dd to c551ee0 Compare February 23, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants