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

Allow combined logical groups to generate working queries #66

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

xjunior
Copy link
Contributor

@xjunior xjunior commented Sep 21, 2023

Allow combined logical groups. I.e.:

filter=(name.givenName eq "Jane" OR name.givenName eq "Jaden") and (name.familyName co "avi" or name.familyName ew "ith")

Without this fix, the parser assumes it can't process a logical operation at the end of a group.

With this fix it produces the following SQL:

SELECT "mock_users".*
FROM "mock_users"
WHERE ("mock_users"."first_name" ILIKE 'Jane' OR "mock_users"."first_name" ILIKE 'Jaden')
    AND ("mock_users"."last_name" ILIKE '%avi%' OR "mock_users"."last_name" ILIKE '%ith')

Copy link
Member

@pond pond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done. Great fix, merging. Thanks!

@pond pond merged commit b6557c3 into RIPAGlobal:main Sep 21, 2023
4 checks passed
This was referenced Sep 25, 2023
@pond
Copy link
Member

pond commented Sep 25, 2023

@xjunior #61, #62, #65 and #66 now all merged and released as v2.5.0, then back-ported to V1 as v1.6.0. Thanks again for the contributions.

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.

None yet

2 participants