Class 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 the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • Cursor

        public Cursor​(io.vertx.sqlclient.Cursor delegate)
      • Cursor

        public Cursor​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.sqlclient.Cursor getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • read

        public io.smallrye.mutiny.Uni<RowSet<Row>> read​(int count)
        Read rows from the cursor, the result is provided asynchronously to the handler.

        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 of read(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 of read(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 from read(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()
        Like close() but with a completionHandler 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 of close().

        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()
        Variant of close() that ignores the result of the operation.

        This method subscribes on the result of close(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from close() but you don't need to compose it with other operations.

      • isClosed

        public boolean isClosed()
        Returns:
        whether the cursor is closed
      • newInstance

        public static Cursor newInstance​(io.vertx.sqlclient.Cursor arg)