You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce method to obtain a position function from OffsetScrollPosition. Tweak documentation wording.
See spring-projects#3070
Original pull request: spring-projects#3072
Copy file name to clipboardExpand all lines: src/main/antora/modules/ROOT/pages/repositories/scrolling.adoc
+5-5
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Scrolling consists of a stable sort, a scroll type (Offset- or Keyset-based scro
6
6
You can define simple sorting expressions by using property names and define static result limiting using the xref:repositories/query-methods-details.adoc#repositories.limit-query-result[`Top` or `First` keyword] through query derivation.
7
7
You can concatenate expressions to collect multiple criteria into one expression.
8
8
9
-
Scroll queries return a `Window<T>` that allows obtaining the elements scroll position which can be used to fetch the next `Window<T>` until your application has consumed the entire query result.
9
+
Scroll queries return a `Window<T>` that allows obtaining the element's scroll position to fetch the next `Window<T>` until your application has consumed the entire query result.
10
10
Similar to consuming a Java `Iterator<List<…>>` by obtaining the next batch of results, query result scrolling lets you access the a `ScrollPosition` through `Window.positionAt(...)`.
11
11
12
12
[source,java]
@@ -26,8 +26,8 @@ do {
26
26
[NOTE]
27
27
====
28
28
The `ScrollPosition` identifies the exact position of an element with the entire query result.
29
-
Query execution treats the position parameter as _exclusive_, which means results will start _after_ the given position.
30
-
`ScrollPosition#offset` and `ScrollPosition#keyset()` as special incarnations of a `ScrollPosition` indicating the start of a scroll operation.
29
+
Query execution treats the position parameter _exclusive_, results will start _after_ the given position.
30
+
`ScrollPosition#offset()` and `ScrollPosition#keyset()` as special incarnations of a `ScrollPosition` indicating the start of a scroll operation.
31
31
====
32
32
33
33
`WindowIterator` provides a utility to simplify scrolling across ``Window``s by removing the need to check for the presence of a next `Window` and applying the `ScrollPosition`.
There is a difference between `ScollPosition.offset()` and `ScollPosition.offset(0L)`.
72
-
The former indicates the start of scroll operation, pointing to no specific offset where as the latter identifies the first element (at position `0`) of the result.
73
-
Given the _exclusive_ nature of scrolling using `ScollPosition.offset(0)` will skip the first element and translate to an offset of 1.
72
+
The former indicates the start of scroll operation, pointing to no specific offset whereas the latter identifies the first element (at position `0`) of the result.
73
+
Given the _exclusive_ nature of scrolling, using `ScollPosition.offset(0)` skips the first element and translate to an offset of `1`.
0 commit comments