Interface PagingJdbcIterable.PagingStatementSupplier
- Enclosing class:
PagingJdbcIterable<R>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Describes a function that creates a new
PreparedStatement that pages results through the given
offset and maxSize, ready to be executed.-
Method Summary
Modifier and TypeMethodDescriptionapply(Connection connection, int offset, int maxSize) Create a newPreparedStatementusing the givenconnection, paging through the providedoffsetandmaxSize.
-
Method Details
-
apply
Create a newPreparedStatementusing the givenconnection, paging through the providedoffsetandmaxSize.- Parameters:
connection- The connection that will be used to create thePreparedStatement.offset- The offset from where to start the page.maxSize- The maximum size of the page, resulting in the maximum page size.- Returns:
- A paging
PreparedStatementready for execution. - Throws:
SQLException- When the statement could not be created.
-