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 Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default 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()`
    `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

    - #### 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

          default 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 © 2020 Eclipse. All rights reserved.