Interface RowCursor
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
RowCursorResultSet
A row supplier represents an open row cursor. Some implementations own the
underlying resource and release it on close(), while others adapt
caller-owned resources and treat close() as a no-op.
The ColumnDefinitions returned by columns() describe the
source-side schema seen by the row consumer. In particular, any
source-specified column types
can influence which low-level builders are created before rows are read. That
matters when the caller wants to parse ByteStringSlices fields
directly into the final builder, for example:
- primitive numeric columns such as int, long, and
double
- fast enum-like object types with a direct byte-slice parser, when that is materially better than first building a string dictionary
- high-cardinality columns where materialising field strings before parsing would be unnecessary work
For ordinary categorical text, source-side typing is usually not necessary. In that common case it is often better to let the row consumer build the natural dictionary first and only request a direct source type when that parser has a real advantage over storing dictionary values.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()default ColumnDefinition[]columns()Returns source-native column definitions when the physical source has them.current()booleannext()
-
Method Details
-
columns
Returns source-native column definitions when the physical source has them.Line-oriented sources normally return no definitions; their logical columns are detected later from the row stream.
- Returns:
- source-native column definitions, or an empty array
-
next
boolean next() -
current
ByteStringSlices current() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-