Skip to content

Commit 8a1b1bb

Browse files
committed
example in paginateLazily() javadoc
1 parent 22512b3 commit 8a1b1bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,8 +981,9 @@ public <T> Optional<T> queryForOne(
981981
* List<String> orderBy = Arrays.asList("Timestamp DESC", "CustomerId", "SaleId");
982982
* try (Connection connection = ...) {
983983
* recentSales.paginateLazily(connection, orderBy, pageSize, Sale.class)
984-
* // You can also .flatMap(), .filter(), takeWhile() etc.
985-
* .forEach(pageOfSales -> ...);
984+
* .flatMap(List::stream) // flatten the page content
985+
* // You can also .map(), .filter(), takeWhile() etc.
986+
* .forEach(sale -> ...);
986987
* }
987988
* }</pre>
988989
*

0 commit comments

Comments
 (0)