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

Add Optional() method to MatchQuery #105

Merged
merged 4 commits into from
Aug 23, 2023

Conversation

chrismarget-j
Copy link
Collaborator

@chrismarget-j chrismarget-j commented Aug 22, 2023

  • Bugfix slice out-of-bound terror (lol typo) when a path query element has no attributes: node() would crash, but node(type='system', label='foo') was okay
  • Eliminate use of positional struct elements in test. This probably broke in Reintroduce CT primitive label feature #103. These are the changes in apstra/two_stage_l3_clos_connectivity_template_integration_test.go.
  • Add optional element to PathQuery and MatchQuery structs, so they know how to string-ify in match+optional context
  • Change MatchQuery to it receives QEQuery implementations rather than only PathQuery objects. Now we can write queries with match(match())
  • Introduce MatchQuery.Optional(), which sets the optional flag on child queries
  • Test

@chrismarget-j chrismarget-j merged commit 5280f96 into main Aug 23, 2023
1 check passed
@chrismarget-j chrismarget-j deleted the feat/104-match-query-optional branch August 23, 2023 00:48
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