Skip to content

Commit 1bb48f2

Browse files
committed
example in paginateLazily() javadoc
1 parent a3a49d8 commit 1bb48f2

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

mug-safesql/src/main/java/com/google/mu/safesql/SafeSql.java

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -989,13 +989,13 @@ public <T> Optional<T> queryForOne(
989989
*
990990
* <p>If {@code orderByKeys} is non-empty, they refer to the columns that must uniquely identify
991991
* a row. These column values are then used to control pagination.
992-
* For example, if {@code [groupId, timestamp]} can uniquely identify a row, the generated
993-
* SQL will use {@code "groupId" > ? OR ("groupId" = ? AND "timestamp" > ?)} for the next page,
992+
* For example, if {@code [timestamp, saleId]} can uniquely identify a row, the generated
993+
* SQL will use {@code "timestamp" > ? OR ("timestamp" = ? AND "saleId" > ?)} for the next page,
994994
* comparing against the previous page's last row.
995995
*
996-
* <p>You can also use descending order, for example by passing {@code "NAME DESC"}.
997-
* The generated paginated query will then use {@code "NAME" < ?} instead of {@code "NAME > ?}
998-
* for the next page.
996+
* <p>You can also use descending order, for example by passing {@code "Timestamp DESC"}.
997+
* The generated paginated query will then use {@code "timestamp" < ?} instead of
998+
* {@code "timestamp" > ?} for the next page.
999999
*
10001000
* <p>The standard SQL {@code FETCH NEXT ROWS} syntax is used for pagination.
10011001
* If {@code orderByKeys} is empty, the paginated query will use {@code OFFSET} keyword
@@ -1030,13 +1030,13 @@ public <T> Stream<List<T>> paginateLazily(
10301030
*
10311031
* <p>If {@code orderByKeys} is non-empty, they refer to the columns that must uniquely identify
10321032
* a row. These column values are then used to control pagination.
1033-
* For example, if {@code [groupId, timestamp]} can uniquely identify a row, the generated
1034-
* SQL will use {@code "groupId" > ? OR ("groupId" = ? AND "timestamp" > ?)} for the next page,
1033+
* For example, if {@code [timestamp, saleId]} can uniquely identify a row, the generated
1034+
* SQL will use {@code "timestamp" > ? OR ("timestamp" = ? AND "saleId" > ?)} for the next page,
10351035
* comparing against the previous page's last row.
10361036
*
1037-
* <p>You can also use descending order, for example by passing {@code "NAME DESC"}.
1038-
* The generated paginated query will then use {@code "NAME" < ?} instead of {@code "NAME > ?}
1039-
* for the next page.
1037+
* <p>You can also use descending order, for example by passing {@code "Timestamp DESC"}.
1038+
* The generated paginated query will then use {@code "timestamp" < ?} instead of
1039+
* {@code "timestamp" > ?} for the next page.
10401040
*
10411041
* <p>The standard SQL {@code FETCH NEXT ROWS} syntax is used for pagination.
10421042
* If {@code orderByKeys} is empty, the paginated query will use {@code OFFSET} keyword
@@ -1074,13 +1074,13 @@ public <T> Stream<List<T>> paginateLazily(
10741074
*
10751075
* <p>If {@code orderByKeys} is non-empty, they refer to the columns that must uniquely identify
10761076
* a row. These column values are then used to control pagination.
1077-
* For example, if {@code [groupId, timestamp]} can uniquely identify a row, the generated
1078-
* SQL will use {@code "groupId" > ? OR ("groupId" = ? AND "timestamp" > ?)} for the next page,
1077+
* For example, if {@code [timestamp, saleId]} can uniquely identify a row, the generated
1078+
* SQL will use {@code "timestamp" > ? OR ("timestamp" = ? AND "saleId" > ?)} for the next page,
10791079
* comparing against the previous page's last row.
10801080
*
1081-
* <p>You can also use descending order, for example by passing {@code "NAME DESC"}.
1082-
* The generated paginated query will then use {@code "NAME" < ?} instead of {@code "NAME > ?}
1083-
* for the next page.
1081+
* <p>You can also use descending order, for example by passing {@code "Timestamp DESC"}.
1082+
* The generated paginated query will then use {@code "timestamp" < ?} instead of
1083+
* {@code "timestamp" > ?} for the next page.
10841084
*
10851085
* <p>The standard SQL {@code FETCH NEXT ROWS} syntax is used for pagination.
10861086
* If {@code orderByKeys} is empty, the paginated query will use {@code OFFSET} keyword
@@ -1115,13 +1115,13 @@ public <T> Stream<List<T>> paginateLazily(
11151115
*
11161116
* <p>If {@code orderByKeys} is non-empty, they refer to the columns that must uniquely identify
11171117
* a row. These column values are then used to control pagination.
1118-
* For example, if {@code [groupId, timestamp]} can uniquely identify a row, the generated
1119-
* SQL will use {@code "groupId" > ? OR ("groupId" = ? AND "timestamp" > ?)} for the next page,
1118+
* For example, if {@code [timestamp, saleId]} can uniquely identify a row, the generated
1119+
* SQL will use {@code "timestamp" > ? OR ("timestamp" = ? AND "saleId" > ?)} for the next page,
11201120
* comparing against the previous page's last row.
11211121
*
1122-
* <p>You can also use descending order, for example by passing {@code "NAME DESC"}.
1123-
* The generated paginated query will then use {@code "NAME" < ?} instead of {@code "NAME > ?}
1124-
* for the next page.
1122+
* <p>You can also use descending order, for example by passing {@code "Timestamp DESC"}.
1123+
* The generated paginated query will then use {@code "timestamp" < ?} instead of
1124+
* {@code "timestamp" > ?} for the next page.
11251125
*
11261126
* <p>The standard SQL {@code FETCH NEXT ROWS} syntax is used for pagination.
11271127
* If {@code orderByKeys} is empty, the paginated query will use {@code OFFSET} keyword

0 commit comments

Comments
 (0)