public class RowStreamWrapper extends Object implements SQLRowStream
| Constructor and Description |
|---|
RowStreamWrapper(SQLConnection connection,
SQLRowStream rowStream) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the stream/underlying cursor(s).
|
void |
close(Handler<AsyncResult<Void>> handler)
Closes the stream/underlying cursor(s).
|
int |
column(String name)
Will convert the column name to the json array index.
|
List<String> |
columns()
Returns all column names available in the underlying resultset.
|
SQLRowStream |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
SQLRowStream |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
SQLRowStream |
fetch(long amount)
Fetch the specified
amount of elements. |
SQLRowStream |
handler(Handler<JsonArray> handler)
Set a data handler.
|
void |
moreResults()
Request for more results if available
|
SQLRowStream |
pause()
Pause the
ReadStream, it sets the buffer in fetch mode and clears the actual demand. |
SQLRowStream |
resultSetClosedHandler(Handler<Void> handler)
Event handler when a resultset is closed.
|
SQLRowStream |
resume()
Resume reading, and sets the buffer in
flowing mode. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpipe, pipeTo, pipeTopublic RowStreamWrapper(SQLConnection connection, SQLRowStream rowStream)
public SQLRowStream exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<JsonArray>exceptionHandler in interface StreamBaseexceptionHandler in interface SQLRowStreamhandler - the exception handlerpublic SQLRowStream handler(Handler<JsonArray> handler)
ReadStreamhandler in interface ReadStream<JsonArray>handler in interface SQLRowStreampublic SQLRowStream fetch(long amount)
ReadStreamamount of elements. If the ReadStream has been paused, reading will
recommence with the specified amount of items, otherwise the specified amount will
be added to the current stream demand.fetch in interface ReadStream<JsonArray>public SQLRowStream pause()
ReadStreamReadStream, it sets the buffer in fetch mode and clears the actual demand.
While it's paused, no data will be sent to the data handler.
pause in interface ReadStream<JsonArray>pause in interface SQLRowStreampublic SQLRowStream resume()
ReadStreamflowing mode.
If the ReadStream has been paused, reading will recommence on it.resume in interface ReadStream<JsonArray>resume in interface SQLRowStreampublic SQLRowStream endHandler(Handler<Void> endHandler)
ReadStreamendHandler in interface ReadStream<JsonArray>endHandler in interface SQLRowStreampublic int column(String name)
SQLRowStreamcolumn in interface SQLRowStreamname - the column namepublic List<String> columns()
SQLRowStreamcolumns in interface SQLRowStreampublic SQLRowStream resultSetClosedHandler(Handler<Void> handler)
SQLRowStreamresultSetClosedHandler in interface SQLRowStreamhandler - called when the current result set is closedpublic void moreResults()
SQLRowStreammoreResults in interface SQLRowStreampublic void close()
SQLRowStreamclose in interface SQLRowStreampublic void close(Handler<AsyncResult<Void>> handler)
SQLRowStreamclose in interface SQLRowStreamhandler - called when the stream/underlying cursor(s) is(are) closedCopyright © 2020. All rights reserved.