Package io.vertx.sqlclient
Interface Cursor
-
public interface CursorA 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 Description Future<Void>close()Release the cursor.booleanhasMore()Returnstruewhen the cursor has results in progress and theread(int)should be called to retrieve them.booleanisClosed()Future<RowSet<Row>>read(int count)Read rows from the cursor, the result is provided asynchronously to thehandler.
-
-
-
Method Detail
-
read
Future<RowSet<Row>> read(int count)
Read rows from the cursor, the result is provided asynchronously to thehandler.- Parameters:
count- the amount of rows to read- Returns:
- a future notified with the result
-
hasMore
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,
-
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
-
-