Class Cursor
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
Cursor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>close()Release the cursor.voidRelease the cursor.Release the cursor.booleanio.vertx.sqlclient.CursorGet the delegate instance.inthashCode()booleanhasMore()Returnstruewhen the cursor has results in progress and theread(int)should be called to retrieve them.booleanisClosed()static CursornewInstance(io.vertx.sqlclient.Cursor delegate) Creates a new instance of theCursor.read(int count) Read rows from the cursor, the result is provided asynchronously to thehandler.readAndAwait(int count) Read rows from the cursor, the result is provided asynchronously to thehandler.readAndForget(int count) Read rows from the cursor, the result is provided asynchronously to thehandler.Describes rows loaded withread(int).toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
Cursor
public Cursor(io.vertx.sqlclient.Cursor delegate) Create a new instance ofCursordelegating to the given (non-null) instance ofCursor. -
Cursor
-
-
Method Details
-
getDelegate
public io.vertx.sqlclient.Cursor getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
read
Read rows from the cursor, the result is provided asynchronously to thehandler.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
count- the amount of rows to read- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Cursor.read(int)
-
readAndAwait
Read rows from the cursor, the result is provided asynchronously to thehandler.Unlike the bare Vert.x variant, this method returns a
RowSet<Row>. This method awaits indefinitely 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 aRuntimeException).- Parameters:
count- the amount of rows to read- Returns:
- The operation result
- See Also:
-
Cursor.read(int)
-
readAndForget
Read rows from the cursor, the result is provided asynchronously to thehandler.Unlike the bare Vert.x variant, this method ignores the
RowSet<Row>result or any failure.- Parameters:
count- the amount of rows to read- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Cursor.read(int)
-
close
Release the cursor. It should be called for prepared queries executed with a fetch size.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
Cursor.close()
-
closeAndAwait
public void closeAndAwait()Release the cursor. It should be called for prepared queries executed with a fetch size.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely 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 aRuntimeException).- See Also:
-
Cursor.close()
-
closeAndForget
Release the cursor. It should be called for prepared queries executed with a fetch size.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
Cursor.close()
-
rowDescriptor
Describes rows loaded withread(int).This returns
nulluntil the first set of rows is fetched from the database. -
hasMore
public boolean hasMore()Returnstruewhen the cursor has results in progress and theread(int)should be called to retrieve them.- Returns:
- whether the cursor has more results,
-
isClosed
public boolean isClosed()- Returns:
- whether the cursor is closed
-
newInstance
Creates a new instance of theCursor. -
hashCode
public int hashCode() -
equals
-
toString
-