DATAMONGO-2072 - Support Range in repository between queries.

We now support o.s.d.domain.Range as method parameter for between queries. This allows more fine grained control over the inclusion/exclusion of the upper/lower bounds. Up till now between required 2 parameters which had been strictly bound to excluding bounds using $gt and $lt.

Original pull request: #645.
This commit is contained in:
Christoph Strobl
2019-02-19 07:49:42 +01:00
committed by Mark Paluch
parent ddad63f28e
commit 5b47648f49
3 changed files with 61 additions and 4 deletions

View File

@@ -188,8 +188,10 @@ The following table shows the keywords that are supported for query methods:
| `{"age" : {"$lte" : age}}`
| `Between`
| `findByAgeBetween(int from, int to)`
| `{"age" : {"$gt" : from, "$lt" : to}}`
| `findByAgeBetween(int from, int to)` +
`findByAgeBetween(Range<Integer> range)`
| `{"age" : {"$gt" : from, "$lt" : to}}` +
lower / upper bounds (`$gt` / `$gte` & `$lt` / `$lte`) according to `Range`
| `In`
| `findByAgeIn(Collection ages)`