DATACASS-627 - Add support for derived Between queries.

We now support derived queries using the Between keyword. Between query parts map to either two simple parameters (findByAgeBetween(int from, int to)) or a Range<T> parameter that defines inclusive/exclusive boundary comparison (findByAgeBetween(Range<Integer> age)).

Between queries use are issued by default as exclusive ranges so findByAgeBetween(int from, int to) maps to age > from AND age < to.
This commit is contained in:
Mark Paluch
2019-02-22 11:12:45 +01:00
parent 8acc6d2111
commit dd3a5a680a
5 changed files with 117 additions and 11 deletions

View File

@@ -6,6 +6,7 @@ This chapter summarizes changes and new features for each release.
[[new-features.2-2-0]]
== What's new in Spring Data for Apache Cassandra 2.2
* Read-only properties annotated with `@ReadOnlyProperty` to exclude non-writable properties from entity-bound `INSERT` and `UPDATE` operations.
* Support for derived `Between` queries.
[[new-features.2-1-0]]
== What's new in Spring Data for Apache Cassandra 2.1

View File

@@ -247,6 +247,11 @@ The following table shows short examples of the keywords that you can use in que
| `findByAgeLessThanEqual(int age)`
| `age <= age`
| `Between`
| `findByAgeBetween(int from, int to)` and `findByAgeBetween(Range<Integer> range)`
| ``age > from AND age < to`` and
lower / upper bounds (`>` / `>=` & `<` / `<=`) according to `Range`
| `In`
| `findByAgeIn(Collection ages)`
| `age IN (ages...)`