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

Non-nested subdocuments result mode #57

Open
V0ldek opened this issue Nov 25, 2022 · 1 comment
Open

Non-nested subdocuments result mode #57

V0ldek opened this issue Nov 25, 2022 · 1 comment
Labels
acceptance: go ahead Reviewed, implementation can start area: result Improvements in query result reporting help wanted External contributions welcome type: feature New feature or request
Milestone

Comments

@V0ldek
Copy link
Member

V0ldek commented Nov 25, 2022

Is your feature request related to a problem? Please describe.
Except for #56 it might be beneficial to have a result mode that automatically filters nested subdocuments. In other words, if we have a match for a big subtree, don't show any results that are nested in that subtree anyway.

Describe the solution you'd like
Consider the query $.a..b[*], and the JSON:

{
    "a": {
        "c": [
            { "b": [1, 2, 3] },
            { "d": { "b": { "x": true } } }
            { "b": { "b": { "b": "value" } } }
        ]
    }
}

Then in the output we should find all the following paths, separated with newlines:

1
2
3
{ "x": true }
{ "b": { "b": "value" } } 

Describe alternatives you've considered
Full subdocuments tracked by #56

Additional context
This should be compatible with #54. Example output for the above JSON:

(1, $['a']['c'][0]['b'][0])
(2, $['a']['c'][0]['b'][1])
(3, $['a']['c'][0]['b'][2])
({ "x": true }, $['a']['c'][1]['d']['b'])
({ "b": { "b": "value" } }, $['a']['c'][2]['b'])
@V0ldek V0ldek self-assigned this Nov 25, 2022
@github-actions github-actions bot added the acceptance: triage Waiting for owner's input label Nov 25, 2022
@github-actions
Copy link

Tagging @V0ldek for notifications

@V0ldek V0ldek added type: feature New feature or request help wanted External contributions welcome mod: engine area: result Improvements in query result reporting labels Nov 25, 2022
@V0ldek V0ldek added this to the Future milestone Nov 25, 2022
@github-actions github-actions bot added acceptance: go ahead Reviewed, implementation can start and removed acceptance: triage Waiting for owner's input labels Nov 25, 2022
@V0ldek V0ldek removed their assignment Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acceptance: go ahead Reviewed, implementation can start area: result Improvements in query result reporting help wanted External contributions welcome type: feature New feature or request
Projects
Development

No branches or pull requests

1 participant