Class Cursor
- All Implemented Interfaces:
MutinyDelegate
original
non Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>
close()
Likeclose()
but with acompletionHandler
called when the cursor has been released.Blocking variant ofclose()
.void
Variant ofclose()
that ignores the result of the operation.boolean
io.vertx.sqlclient.Cursor
int
hashCode()
boolean
hasMore()
boolean
isClosed()
static Cursor
newInstance
(io.vertx.sqlclient.Cursor arg) read
(int count) Read rows from the cursor, the result is provided asynchronously to thehandler
.readAndAwait
(int count) Blocking variant ofread(int)
.void
readAndForget
(int count) Variant ofread(int)
that ignores the result of the operation.toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Cursor
public Cursor(io.vertx.sqlclient.Cursor delegate) -
Cursor
-
-
Method Details
-
getDelegate
public io.vertx.sqlclient.Cursor getDelegate()- Specified by:
getDelegate
in interfaceMutinyDelegate
- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
read
Read rows from the cursor, the result is provided asynchronously to thehandler
.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
count
- the amount of rows to read- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
readAndAwait
Blocking variant ofread(int)
.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).
- Parameters:
count
- the amount of rows to read- Returns:
- the RowSet
instance produced by the operation.
-
readAndForget
public void readAndForget(int count) Variant ofread(int)
that ignores the result of the operation.This method subscribes on the result of
read(int)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromread(int)
but you don't need to compose it with other operations.- Parameters:
count
- the amount of rows to read
-
hasMore
public boolean hasMore()- Returns:
- whether the cursor has more results,
-
close
Likeclose()
but with acompletionHandler
called when the cursor has been released.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
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() -
isClosed
public boolean isClosed()- Returns:
- whether the cursor is closed
-
newInstance
-