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

Parse the wildcard child selector .*/[*] #6

Closed
V0ldek opened this issue Sep 14, 2022 · 0 comments · Fixed by #75
Closed

Parse the wildcard child selector .*/[*] #6

V0ldek opened this issue Sep 14, 2022 · 0 comments · Fixed by #75
Assignees
Labels
area: selector Support for a JSONPath selector type: feature New feature or request
Milestone

Comments

@V0ldek
Copy link
Member

V0ldek commented Sep 14, 2022

Is your feature request related to a problem? Please describe.
The wildcard child selector should be recognized by the parser and parsed into an appropriate JsonPathQueryNode. Note that this means both the .* and [*] patterns, selecting any child. The index and non-index version have identical semantics.

Describe the solution you'd like
There are two possible solutions.

  1. Turn Label into a variant type and have a variant for the wildcard.
  2. Add a separate node type for AnyChild.

It's not obvious to me which one is better. Approach 2 seems to be a little easier to do, since it won't have to touch the widely used Label type.

The consumers of queries should react to the new variant with an error "not supported yet".

Additional context
Find the syntax for the selectors in the RFC:

@V0ldek V0ldek added type: feature New feature or request help wanted External contributions welcome good first issue Good for newcomers acceptance: go ahead Reviewed, implementation can start labels Sep 14, 2022
@V0ldek V0ldek assigned V0ldek and unassigned V0ldek Sep 14, 2022
@V0ldek V0ldek changed the title Parse the dot-wildcard selector .* Parse the wildcard selector .*/`..* Sep 15, 2022
@V0ldek V0ldek changed the title Parse the wildcard selector .*/`..* Parse the wildcard selector .*/..*` Sep 15, 2022
@V0ldek V0ldek changed the title Parse the wildcard selector .*/..*` Parse the wildcard selector .*/..* Sep 15, 2022
@V0ldek V0ldek changed the title Parse the wildcard selector .*/..* Parse the wildcard selectors .*/..*/.[*]/..[*] Sep 15, 2022
@V0ldek V0ldek added this to the v1.0.0 milestone Sep 15, 2022
@V0ldek V0ldek added mod: parser area: selector Support for a JSONPath selector and removed mod: engine labels Nov 23, 2022
@V0ldek V0ldek changed the title Parse the wildcard selectors .*/..*/.[*]/..[*] Parse the wildcard child selector .*/.[*] Jan 21, 2023
@V0ldek V0ldek self-assigned this Jan 21, 2023
@V0ldek V0ldek removed help wanted External contributions welcome good first issue Good for newcomers labels Jan 21, 2023
V0ldek added a commit that referenced this issue Jan 22, 2023
Both shorthand `.*` and full `[*]` forms are recognised.

Related: #6
@V0ldek V0ldek changed the title Parse the wildcard child selector .*/.[*] Parse the wildcard child selector .*/[*] Jan 22, 2023
V0ldek added a commit that referenced this issue Jan 22, 2023
Both shorthand `.*` and full `[*]` forms are recognised.

Related: #6
@github-actions github-actions bot removed the acceptance: go ahead Reviewed, implementation can start label Jan 22, 2023
V0ldek added a commit that referenced this issue Jan 28, 2023
Expressions parsed in #6 are now compiled into correct automata.

Related #7
V0ldek added a commit that referenced this issue Jan 28, 2023
Expressions parsed in #6 are now compiled into correct automata.

Related #7
V0ldek added a commit that referenced this issue Jan 28, 2023
Expressions parsed in #6 are now compiled into correct automata.

Related #7
@V0ldek V0ldek mentioned this issue Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: selector Support for a JSONPath selector type: feature New feature or request
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

1 participant