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

Please add LeftOpenBetween, RightOpenBetween and OpenBetween as supported query keywords [DATACMNS-1488] #1923

Closed
spring-projects-issues opened this issue Mar 4, 2019 · 1 comment
Assignees
Labels
in: repository status: declined type: enhancement

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Mar 4, 2019

teclxl opened DATACMNS-1488 and commented

LeftOpenBetween, RightOpenBetween, and OpenBetween respectively represent the three conditions of left-open and right-closed interval, left-closed and right-open interval, and both open interval. They are as supplements to Between which represent the condition of closed interval. The JPQL like this:

  • findByDateLeftOpenBetween, … where x.date > ?1 and x.date <= ?2
  • findByDateRightOpenBetween, … where x.date >= ?1 and x.date < ?2
  • findByDateOpenBetween , … where x.date > ?1 and x.date < ?2

I know this is not the standard usage of JPQL or even SQL, but the three conditions are often used, and the method name is too long when combined use LessThan, LessThanEqual, GreaterThan, and GreaterThanEqual(E.g findByOpTimeGreaterThanEqualAndOpTimeLessThan)


Issue Links:

  • DATAJPA-1511 Add support for derived 'between' queries using Range

  • DATAMONGO-2072 Add support for derived 'between' queries using Range

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Mar 4, 2019

Oliver Drotbohm commented

We're in the progress of adding support for Range as parameter for Between queries. That allows clients to define which kind of boundary mapping is desired

@spring-projects-issues spring-projects-issues added status: declined in: repository type: enhancement labels Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: repository status: declined type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants