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 HAS operator #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

DropsOfSerenity
Copy link
Contributor

@DropsOfSerenity DropsOfSerenity commented May 4, 2022

@TomAlperin reached out to me regarding an Array operator. Let me know if this PR addresses your needs @TomAlperin

Changes

Added the has operator. You can use the operator like this:

?filter=role__has:role1|role2

This reads in English as: the role array has either role1 OR role2

@DropsOfSerenity DropsOfSerenity requested review from TomAlperin, a team, nbheemanathi, apethoud, fluturecode and joshwingreene and removed request for a team May 4, 2022 02:29
@DropsOfSerenity DropsOfSerenity force-pushed the feature/add-has-operator branch from d5f07a4 to bea224d Compare May 4, 2022 05:53
Copy link

@TomAlperin TomAlperin left a comment

Choose a reason for hiding this comment

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

Looks good but have not tested. Thanks for doing this so quickly.

@DropsOfSerenity
Copy link
Contributor Author

DropsOfSerenity commented May 4, 2022

Looks good but have not tested. Thanks for doing this so quickly.

Edit: I May have to publish as a new version, as installing from github doesn't work for this package. I'll do some testing before I publish a new version.

@@ -168,4 +168,5 @@ A list of all operators are as follows:
| `lte` | less than or equal to |
| `startswith` | starts with |
| `endswith` | ends with |
| `has` | array has any element |

Choose a reason for hiding this comment

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

Nice!

Copy link

@fluturecode fluturecode left a comment

Choose a reason for hiding this comment

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

Nice work!

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