Package org.jdbi.v3.core.result
Interface ResultSetAccumulator<T>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ResultSetAccumulator<T>AResultSetAccumulatorrepeatedly combines rows from the givenResultSetto produce a single result.jdbiwill advance theResultSetbetween each method invocation, so don't callResultSet.next()please.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tapply(T previous, java.sql.ResultSet rs, StatementContext ctx)Extract a single row from the result set, and combine it with the accumulator to produce a result.
-
-
-
Method Detail
-
apply
T apply(T previous, java.sql.ResultSet rs, StatementContext ctx) throws java.sql.SQLException
Extract a single row from the result set, and combine it with the accumulator to produce a result.- Parameters:
previous- the previous objectrs- the ResultSet, please do not advance itctx- the statement context- Returns:
- the accumulated value
- Throws:
java.sql.SQLException- in the face of grave danger
-
-