com.tibco.datagrid

## Interface ResultSet

- All Superinterfaces:
    java.lang.AutoCloseable, java.lang.Iterable<Row>

      public interface ResultSet
      extends java.lang.Iterable<Row>, java.lang.AutoCloseable

  A resultset object is used to iterate over some or all of the rows that are returned after executing a query.

  To create a resultset object, call `Statement.executeQuery`.

  A program that creates a resultset object should explicitly call `ResultSet.close` to reclaim its resources.

  Since Version 4.10: Whenever a `ResultSet` that did not have its `ResultSet.close` method called is garbage collected, the native resources will be reclaimed automatically. This behavior is controlled by the com.tibco.tibdg.autoclose System Property. If the property is not set or set to "cleanup" (the default), the native resources will be reclaimed as if the `ResultSet.close` method had been called. If the System Property is set to "warn", a warning will be printed to stderr instead of doing the cleanup. If the property is set to "inactive", this feature will not be activated.

  This interface is implemented internally. Applications do not implement this interface.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the resultset object.
    `Statement` | `getStatement()` Returns the `Statement` that created this ResultSet.
    `java.util.Iterator<Row>` | `iterator()` Returns the `Iterator` for this resultset.

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Method Detail

    - #### iterator

          java.util.Iterator<Row> iterator()

      Returns the `Iterator` for this resultset. Each resultset object has only one Iterator so repeated calls to this method will always return the same Iterator. If you need to restart the iteration you must create a new resultset. Note that the row returned can be used in tibdgRow methods but may not be used in table operations.
      Specified by:
        `iterator` in interface `java.lang.Iterable<Row>`
      Returns:
        Iterator

    - #### close

          void close()
              throws DataGridException

      Close the resultset object.

      Releases all resources associated with this resultset object.

      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Throws:
        `DataGridException` - in case of failures

    - #### getStatement

          Statement getStatement()
                          throws DataGridException

      Returns the `Statement` that created this ResultSet.
      Returns:
        the Statement
      Throws:
        `DataGridException` - in case of failures