Skip to content

Conversation

@mechelon
Copy link
Member

This pull request applies code style fixes from an analysis carried out by StyleCI.


For more information, click here.

@mechelon mechelon merged commit 72ba501 into feature/compound-filters Jan 30, 2023
@mechelon mechelon deleted the analysis-Zn2DGN branch January 30, 2023 16:51
@what-the-diff
Copy link

what-the-diff bot commented Jan 30, 2023

  • The AND and OR constants were changed from CONST to const.
  • A test was added for a filter bag with the AND operator and two conditions, which checks that it creates an array of filters as expected (with one key-value pair per condition).
  • Another test was added for a filter bag with the OR operator and three conditions, which also checks that it creates an array of filters as expected (with one key-value pair per condition). It then adds another nested compound query inside this first compound query using the same logic - checking each value in turn against what is returned by $filterBagQuery[Operators::OR][1] etc., where Operators::OR refers to 'or' in JSON format ('and' would be used if we wanted all 3 values at once)
  • Finally there's a new exception thrown when nesting too many bags within other bags: "The maximum nesting level of compound filters must not exceed 2." This means you can't have more than 1 layer deep on your queries; e.g.:

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.

3 participants