Interface Jdbc.RowConsumer

All Superinterfaces:
com.landawn.abacus.util.Throwables.Consumer<ResultSet,SQLException>
Enclosing class:
Jdbc
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 static interface Jdbc.RowConsumer extends com.landawn.abacus.util.Throwables.Consumer<ResultSet,SQLException>
Don't use RowConsumer in AbstractPreparedQuery.forEach(RowConsumer) or any place where multiple records will be consumed by it, if column labels/count are used in accept(ResultSet). Consider using BiRowConsumer instead because it's more efficient to consume multiple records when column labels/count are used.
  • Field Details

  • Method Details

    • accept

      void accept(ResultSet rs) throws SQLException
      Specified by:
      accept in interface com.landawn.abacus.util.Throwables.Consumer<ResultSet,SQLException>
      Throws:
      SQLException
    • andThen

      default Jdbc.RowConsumer andThen(com.landawn.abacus.util.Throwables.Consumer<? super ResultSet,SQLException> after)
    • toBiRowConsumer

      default Jdbc.BiRowConsumer toBiRowConsumer()
    • oneOff

      @Beta @SequentialOnly @Stateful static Jdbc.RowConsumer oneOff(Consumer<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray> consumer)
      It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.
      Parameters:
      consumer -
      Returns:
    • oneOff

      @Beta @SequentialOnly @Stateful static Jdbc.RowConsumer oneOff(Class<?> entityClass, Consumer<com.landawn.abacus.util.NoCachingNoUpdating.DisposableObjArray> consumer)
      It's stateful. Don't save or cache the returned instance for reuse or use it in parallel stream.
      Parameters:
      entityClass - used to fetch column/row value from ResultSet by the type of fields/columns defined in this class.
      consumer -
      Returns: