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

    Modifier and Type
    Method
    Description
    Release the cursor.
    boolean
    Returns true when the cursor has results in progress and the read(int) should be called to retrieve them.
    boolean
     
    read(int count)
    Read rows from the cursor, the result is provided asynchronously to the handler.
    Describes rows loaded with read(int).
  • Method Details

    • rowDescriptor

      default RowDescriptor rowDescriptor()
      Describes rows loaded with read(int).

      This returns null until the first set of rows is fetched from the database.

    • read

      Future<RowSet<Row>> read(int count)
      Read rows from the cursor, the result is provided asynchronously to the handler.
      Parameters:
      count - the amount of rows to read
      Returns:
      a future notified with the result
    • hasMore

      boolean hasMore()
      Returns true when the cursor has results in progress and the read(int) 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.

    • isClosed

      boolean isClosed()
      Returns:
      whether the cursor is closed