Package ai.velr

Class Stream

java.lang.Object
ai.velr.Stream
All Implemented Interfaces:
AutoCloseable, Iterable<Table>

public final class Stream extends Object implements AutoCloseable, Iterable<Table>
Streaming result-table handle returned by Velr.exec(String).

A query may produce zero or more result tables. Pull tables one at a time with nextTable() or iterate over the stream. Closing the stream closes any still-open tables produced by it.

  • Method Details

    • nextTable

      public Table nextTable()
      Pull the next result table.
      Returns:
      next table, or null when the stream is exhausted
    • iterator

      public Iterator<Table> iterator()
      Return an iterator over remaining result tables.
      Specified by:
      iterator in interface Iterable<Table>
      Returns:
      table iterator
    • close

      public void close()
      Close this stream and any open tables produced by it.
      Specified by:
      close in interface AutoCloseable
    • registerChild

      public void registerChild(ai.velr.ChildHandle child)
      Driver-internal child-handle registration method.
    • unregisterChild

      public void unregisterChild(ai.velr.ChildHandle child)
      Driver-internal child-handle unregistration method.