- java.lang.Object
-
- io.vertx.mutiny.ext.sql.SQLRowStream
-
- All Implemented Interfaces:
io.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>,io.vertx.mutiny.core.streams.StreamBase
public class SQLRowStream extends Object implements io.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
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. NOTE: This class has been automatically generated from theoriginalnon Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static io.smallrye.mutiny.vertx.TypeArg<SQLRowStream>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description SQLRowStream(io.vertx.ext.sql.SQLRowStream delegate)SQLRowStream(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>close()Closes the stream/underlying cursor(s).VoidcloseAndAwait()Blocking variant ofclose().voidcloseAndForget()Variant ofclose()that ignores the result of the operation.intcolumn(String name)List<String>columns()SQLRowStreamendHandler(Runnable endHandler)booleanequals(Object o)SQLRowStreamexceptionHandler(Consumer<Throwable> handler)io.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>fetch(long arg0)io.vertx.ext.sql.SQLRowStreamgetDelegate()SQLRowStreamhandler(Consumer<io.vertx.core.json.JsonArray> handler)inthashCode()voidmoreResults()static SQLRowStreamnewInstance(io.vertx.ext.sql.SQLRowStream arg)SQLRowStreampause()io.vertx.mutiny.core.streams.Pipe<io.vertx.core.json.JsonArray>pipe()io.smallrye.mutiny.Uni<Void>pipeTo(io.vertx.mutiny.core.streams.WriteStream<io.vertx.core.json.JsonArray> dst)VoidpipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<io.vertx.core.json.JsonArray> dst)voidpipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<io.vertx.core.json.JsonArray> dst)SQLRowStreamresultSetClosedHandler(Runnable handler)SQLRowStreamresume()Iterable<io.vertx.core.json.JsonArray>toBlockingIterable()Stream<io.vertx.core.json.JsonArray>toBlockingStream()io.smallrye.mutiny.Multi<io.vertx.core.json.JsonArray>toMulti()StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.smallrye.mutiny.vertx.TypeArg<SQLRowStream> __TYPE_ARG
-
-
Constructor Detail
-
SQLRowStream
public SQLRowStream(io.vertx.ext.sql.SQLRowStream delegate)
-
SQLRowStream
public SQLRowStream(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.sql.SQLRowStream getDelegate()
- Specified by:
getDelegatein interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>- Specified by:
getDelegatein interfaceio.vertx.mutiny.core.streams.StreamBase
-
fetch
public io.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray> fetch(long arg0)
- Specified by:
fetchin interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
pipe
public io.vertx.mutiny.core.streams.Pipe<io.vertx.core.json.JsonArray> pipe()
- Specified by:
pipein interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
pipeTo
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> pipeTo(io.vertx.mutiny.core.streams.WriteStream<io.vertx.core.json.JsonArray> dst)
- Specified by:
pipeToin interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
pipeToAndAwait
public Void pipeToAndAwait(io.vertx.mutiny.core.streams.WriteStream<io.vertx.core.json.JsonArray> dst)
- Specified by:
pipeToAndAwaitin interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
pipeToAndForget
public void pipeToAndForget(io.vertx.mutiny.core.streams.WriteStream<io.vertx.core.json.JsonArray> dst)
- Specified by:
pipeToAndForgetin interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
exceptionHandler
public SQLRowStream exceptionHandler(Consumer<Throwable> handler)
- Specified by:
exceptionHandlerin interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>- Specified by:
exceptionHandlerin interfaceio.vertx.mutiny.core.streams.StreamBase
-
handler
public SQLRowStream handler(Consumer<io.vertx.core.json.JsonArray> handler)
- Specified by:
handlerin interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
pause
public SQLRowStream pause()
- Specified by:
pausein interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
resume
public SQLRowStream resume()
- Specified by:
resumein interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
endHandler
public SQLRowStream endHandler(Runnable endHandler)
- Specified by:
endHandlerin interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
column
public int column(String name)
- Parameters:
name- the column name- Returns:
- the json array index
-
resultSetClosedHandler
public SQLRowStream resultSetClosedHandler(Runnable handler)
- Parameters:
handler- called when the current result set is closed- Returns:
-
moreResults
public void moreResults()
-
close
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
Closes the stream/underlying cursor(s). The actual close happens asynchronously.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
public Void closeAndAwait()
Blocking variant ofclose().This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
public void closeAndForget()
-
toMulti
@CheckReturnValue public io.smallrye.mutiny.Multi<io.vertx.core.json.JsonArray> toMulti()
- Specified by:
toMultiin interfaceio.vertx.mutiny.core.streams.ReadStream<io.vertx.core.json.JsonArray>
-
toBlockingIterable
public Iterable<io.vertx.core.json.JsonArray> toBlockingIterable()
-
toBlockingStream
public Stream<io.vertx.core.json.JsonArray> toBlockingStream()
-
newInstance
public static SQLRowStream newInstance(io.vertx.ext.sql.SQLRowStream arg)
-
-