Class Cursor
- java.lang.Object
-
- io.vertx.mutiny.sqlclient.Cursor
-
public class Cursor extends Object
A cursor that reads progressively rows from the database, it is useful for reading very large result sets. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<Cursor>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>
close()
Likeclose()
but with acompletionHandler
called when the cursor has been released.Void
closeAndAwait()
Blocking variant ofclose()
.void
closeAndForget()
Variant ofclose()
that ignores the result of the operation.boolean
equals(Object o)
io.vertx.sqlclient.Cursor
getDelegate()
int
hashCode()
boolean
hasMore()
boolean
isClosed()
static Cursor
newInstance(io.vertx.sqlclient.Cursor arg)
io.smallrye.mutiny.Uni<RowSet<Row>>
read(int count)
Read rows from the cursor, the result is provided asynchronously to thehandler
.RowSet<Row>
readAndAwait(int count)
Blocking variant ofread(int)
.void
readAndForget(int count)
Variant ofread(int)
that ignores the result of the operation.String
toString()
-
-
-
Constructor Detail
-
Cursor
public Cursor(io.vertx.sqlclient.Cursor delegate)
-
Cursor
public Cursor(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.sqlclient.Cursor getDelegate()
-
read
public io.smallrye.mutiny.Uni<RowSet<Row>> read(int count)
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
public RowSet<Row> readAndAwait(int count)
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
public io.smallrye.mutiny.Uni<Void> 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
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()
-
isClosed
public boolean isClosed()
- Returns:
- whether the cursor is closed
-
newInstance
public static Cursor newInstance(io.vertx.sqlclient.Cursor arg)
-
-