A ReadStream of Rows from the underlying RDBMS. This class follows the ReadStream semantics and will automatically close the underlying resources if all returned rows are returned. For cases where the results are ignored before the full processing of the returned rows is complete the close method MUST be called in order to release underlying resources.

The interface is minimal in order to support all SQL clients not just JDBC.

  • SQLRowStream
    • Basic
      • Identifiable
      • Object
        • Anything
    • ReadStream
      • StreamBase

no subtypes hierarchy

Initializer
SQLRowStream(SQLRowStream unknown)
Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
closeshared default void close()

Closes the stream/underlying cursor(s). The actual close happens asynchronously.

closeshared default void close(Anything(Throwable?) handler)

Closes the stream/underlying cursor(s). The actual close happens asynchronously.

Parameters:
  • handler

    called when the stream/underlying cursor(s) is(are) closed

columnshared default Integer column(String name)

Will convert the column name to the json array index.

Parameters:
  • name

    the column name

columnsshared default List<String> columns()

Returns all column names available in the underlying resultset. One needs to carefully use this method since in contrast to the singular version it does not perform case insensitive lookups or takes alias in consideration on the column names.

endHandlershared actual default SQLRowStream endHandler(Anything() endHandler)

Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.

Refines ReadStream.endHandler
exceptionHandlershared actual default SQLRowStream exceptionHandler(Anything(Throwable) handler)

Set an exception handler.

Refines StreamBase.exceptionHandler
handlershared actual default SQLRowStream handler(Anything(Array) handler)

Set a data handler. As data is read, the handler will be called with the data.

Refines ReadStream.handler
moreResultsshared default void moreResults()

Request for more results if available

pauseshared actual default SQLRowStream pause()

Pause the ReadSupport. While it's paused, no data will be sent to the dataHandler

Refines ReadStream.pause
resultSetClosedHandlershared default SQLRowStream resultSetClosedHandler(Anything() handler)

Event handler when a resultset is closed. This is useful to request for more results.

Parameters:
  • handler

    called when the current result set is closed

resumeshared actual default SQLRowStream resume()

Resume reading. If the ReadSupport has been paused, reading will recommence on it.

Refines ReadStream.resume
Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: ReadStream<T>
endHandler, exceptionHandler, handler, pause, resume
Methods inherited from: StreamBase
exceptionHandler