Package org.apache.calcite.avatica.util
Interface Cursor
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractCursor,ArrayIteratorCursor,IteratorCursor,ListIteratorCursor,MapIteratorCursor,PositionedCursor,RecordIteratorCursor
Interface to an iteration that is similar to, and can easily support,
a JDBC
ResultSet, but is simpler to implement.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAccessor of a column value. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this cursor and releases resources.createAccessors(List<ColumnMetaData> types, 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 Details
-
createAccessors
List<Cursor.Accessor> createAccessors(List<ColumnMetaData> types, 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
Moves to the next row.- Returns:
- Whether moved
- Throws:
SQLException- on database error
-
close
void close()Closes this cursor and releases resources.- Specified by:
closein interfaceAutoCloseable
-
wasNull
Returns whether the last value returned was null.- Throws:
SQLException- on database error
-