adding the "between" specification to make queries easier #690
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recently, I noticed the absence of a
Predicate
specification that tests whether a given literal valuev
is between two dynamic expressionsx
andy
.In a real-world scenario, I encountered this need while checking if a specific date fell between two values stored in the database. At the time, I worked around this by combining "greater than" and "less than" conditions to achieve the desired result. However, wouldn't it be much cleaner and less verbose if we could express this condition directly in a clearer way?
This addition introduces a new
between
method that improves query readability and conciseness. I believe this enhancement would make the API more intuitive for developers who encounter similar use cases.(This is my first contribution; please let me know if I missed any steps or if further adjustments are needed. I appreciate your feedback!)