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

Operator availability - between operator #319

Open
Meenakshise opened this issue Oct 28, 2022 · 1 comment
Open

Operator availability - between operator #319

Meenakshise opened this issue Oct 28, 2022 · 1 comment
Milestone

Comments

@Meenakshise
Copy link

As between operator accepts 3 inputs ex : c is between a and b.
But our operator just takes 2 inputs a and b. out of which one is fact and one is the actual value to compare against
Is there any way I could solve this?
Should I pass between range in the form of array for ex, if my requirement is
is 7 between 20 and 30. Then a can be 7 and b can be array of 2 numbers which is [20, 30] and I can create a custom operator which is between and that accepts 2 numbers in the number. I this fine or is there any other way in which the between operator can be done.

@chris-pardy
Copy link
Collaborator

chris-pardy commented Aug 25, 2023

@Meenakshise I would suggest either using a 2 element array for min/mix or an object for your value for instance:

{
     "fact": "count",
     "operator": "between",
     "value": {
           "min": 1,
           "max": 10
     }
}

The advantage of an object is that you could have properties like "min", "minInclusive", "max", "maxInclusive" in order to specify the behavior at the edges if needed.

@chris-pardy chris-pardy added this to the version 7 milestone Aug 25, 2023
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

No branches or pull requests

2 participants