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.
package |
Default |
---|
__construct()
close( $arg0 = null) : void
close()
Closes the stream/underlying cursor(s). The actual close happens asynchronously.
param $handler [callable] called when the stream/underlying cursor(s) is(are) closed close($handler)
callable
column( $arg0) : integer
string
integer
the json array index
columns() : array
array
the list of columns names returned by the query
endHandler( $arg0) : $this
callable
$this
exceptionHandler( $arg0) : $this
callable
$this
fetch( $arg0) : $this
integer
$this
a reference to this, so the API can be used fluently
handler( $arg0) : $this
callable
$this
moreResults() : void
pause() : $this
$this
pipe() : \io\vertx\jphp\ext\sql\Pipe<JsonArray>
The stream will be resumed when the pipe will be wired to a WriteStream
.
\io\vertx\jphp\ext\sql\Pipe
a pipe
pipeTo( $arg0, $arg1 = null) : void
param $dst [WriteStream
Pipe this ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
param $dst [WriteStream
WriteStream
callable
resultSetClosedHandler( $arg0) : $this
callable
$this
resume() : $this
$this