Package org.apache.calcite.avatica.util
Interface Cursor
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
AbstractCursor,ArrayIteratorCursor,IteratorCursor,ListIteratorCursor,MapIteratorCursor,PositionedCursor,RecordIteratorCursor
public interface Cursor extends java.lang.AutoCloseableInterface to an iteration that is similar to, and can easily support, a JDBCResultSet, but is simpler to implement.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCursor.AccessorAccessor of a column value.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes this cursor and releases resources.java.util.List<Cursor.Accessor>createAccessors(java.util.List<ColumnMetaData> types, java.util.Calendar localCalendar, ArrayImpl.Factory factory)Creates a list of accessors, one per column.booleannext()Moves to the next row.booleanwasNull()Returns whether the last value returned was null.
-
-
-
Method Detail
-
createAccessors
java.util.List<Cursor.Accessor> createAccessors(java.util.List<ColumnMetaData> types, java.util.Calendar localCalendar, ArrayImpl.Factory factory)
Creates a list of accessors, one per column.- Parameters:
types- List of column types, perTypes.localCalendar- Calendar in local time zonefactory- Factory that creates sub-ResultSets when needed- Returns:
- List of column accessors
-
next
boolean next() throws java.sql.SQLExceptionMoves to the next row.- Returns:
- Whether moved
- Throws:
java.sql.SQLException- on database error
-
close
void close()
Closes this cursor and releases resources.- Specified by:
closein interfacejava.lang.AutoCloseable
-
wasNull
boolean wasNull() throws java.sql.SQLExceptionReturns whether the last value returned was null.- Throws:
java.sql.SQLException- on database error
-
-