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, waititerator, toStreamforEachRemaining, removeforEach, spliteratorpublic RowIterator(@Nonnull PreparedStatement ps)
public boolean hasNext()
throws IllegalStateException
hasNext in interface Iterator<ResultSet>IllegalStateExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright 2019-2022, Pavel Ponec