io.vertx.sqlclient

## Interface Cursor

-     public interface Cursor

  A cursor that reads progressively rows from the database, it is useful for reading very large result sets.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Future<Void>` | `close()` Release the cursor.
    `void` | `close(Handler<AsyncResult<Void>> completionHandler)` Like `close()` but with a `completionHandler` called when the cursor has been released.
    `boolean` | `hasMore()` Returns `true` when the cursor has results in progress and the `read(int, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.sqlclient.RowSet<io.vertx.sqlclient.Row>>>)` should be called to retrieve them.
    `boolean` | `isClosed()`
    `Future<RowSet<Row>>` | `read(int count)` Like `read(int, Handler)` but returns a `Future` of the asynchronous result
    `void` | `read(int count, Handler<AsyncResult<RowSet<Row>>> handler)` Read rows from the cursor, the result is provided asynchronously to the `handler`.

- - ### Method Detail

    - #### read

          void read(int count,
                    Handler<AsyncResult<RowSet<Row>>> handler)

      Read rows from the cursor, the result is provided asynchronously to the `handler`.
      Parameters:
        `count` - the amount of rows to read
        `handler` - the handler for the result

    - #### read

          Future<RowSet<Row>> read(int count)

      Like `read(int, Handler)` but returns a `Future` of the asynchronous result

    - #### hasMore

          boolean hasMore()

      Returns `true` when the cursor has results in progress and the `read(int, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.sqlclient.RowSet<io.vertx.sqlclient.Row>>>)` should be called to retrieve them.
      Returns:
        whether the cursor has more results,

    - #### close

          Future<Void> close()

      Release the cursor.

      It should be called for prepared queries executed with a fetch size.

    - #### close

          void close(Handler<AsyncResult<Void>> completionHandler)

      Like `close()` but with a `completionHandler` called when the cursor has been released.

    - #### isClosed

          boolean isClosed()

      Returns:
        whether the cursor is closed

Copyright © 2023 Eclipse. All rights reserved.