Class ResultSetIterator

java.lang.Object
com.oracle.labs.mlrg.olcut.util.IOSpliterator<ColumnarIterator.Row>
org.tribuo.data.columnar.ColumnarIterator
org.tribuo.data.sql.ResultSetIterator
All Implemented Interfaces:
Iterator<ColumnarIterator.Row>, Spliterator<ColumnarIterator.Row>

public class ResultSetIterator extends ColumnarIterator
An iterator over a ResultSet returned from JDBC.
  • Constructor Details

    • ResultSetIterator

      public ResultSetIterator(ResultSet rs) throws SQLException
      Construct a result set iterator over the supplied result set.
      Parameters:
      rs - The result set.
      Throws:
      SQLException - If the result set cannot be inspected.
    • ResultSetIterator

      public ResultSetIterator(ResultSet rs, int fetchSize) throws SQLException
      Constructs a result set iterator over the supplied result set using the specified fetch buffer size.
      Parameters:
      rs - The result set.
      fetchSize - The fetch size.
      Throws:
      SQLException - If the result set cannot be inspected.
  • Method Details