public class RowIterator extends Object implements LoopingIterator<ResultSet>
new RowIterator(ps).toStream().forEach((RsConsumer)(resultSet) -> { int value = resultSet.getInt(1); System.out.println(" value: " + value); });
JdbcBuilder
Constructor and Description |
---|
RowIterator(PreparedStatement ps) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close all resources
|
boolean |
hasNext()
The last checking closes all resources.
|
ResultSet |
next() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
iterator, toStream
forEachRemaining, remove
forEach, spliterator
public RowIterator(@Nonnull PreparedStatement ps)
public boolean hasNext() throws IllegalStateException
hasNext
in interface Iterator<ResultSet>
IllegalStateException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright 2019-2022, Pavel Ponec