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>
A ResultSetAccumulator repeatedly combines rows from the given ResultSet to produce a single result. jdbi will advance the ResultSet between each method invocation, so don't call ResultSet.next() please.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(T previous, ResultSet rs, StatementContext ctx)
    Extract a single row from the result set, and combine it with the accumulator to produce a result.
  • Method Details

    • apply

      T apply(T previous, ResultSet rs, StatementContext ctx) throws SQLException
      Extract a single row from the result set, and combine it with the accumulator to produce a result.
      Parameters:
      previous - the previous object
      rs - the ResultSet, please do not advance it
      ctx - the statement context
      Returns:
      the accumulated value
      Throws:
      SQLException - in the face of grave danger