Package ai.velr
Class Table
java.lang.Object
ai.velr.Table
- All Implemented Interfaces:
AutoCloseable
One result table returned by a query.
A table owns row cursors opened from it. Close the table when it is no longer needed. Tables
returned from Velr.execOne(String) are parented to the connection; tables pulled from a
Stream are stream-scoped and are closed when their stream is closed.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this table and any open row cursors owned by it.collect()Collect all rows into JVM-owned memory.intReturn the number of columns in this result table.Return result column names in order.voidregisterChild(ai.velr.ChildHandle child) Driver-internal child-handle registration method.rows()Open a streaming row cursor for this table.byte[]Export this result table as Arrow IPC file bytes.toMaps()Collect all rows as maps keyed by column name.voidunregisterChild(ai.velr.ChildHandle child) Driver-internal child-handle unregistration method.
-
Method Details
-
columnCount
public int columnCount()Return the number of columns in this result table.- Returns:
- column count
-
columnNames
Return result column names in order.- Returns:
- immutable column-name list
-
rows
Open a streaming row cursor for this table.- Returns:
- row cursor; close it when finished
-
collect
Collect all rows into JVM-owned memory.- Returns:
- table rows as lists of cells
-
toMaps
Collect all rows as maps keyed by column name.- Returns:
- rows as maps from column name to Java value
-
toArrowIpc
public byte[] toArrowIpc()Export this result table as Arrow IPC file bytes.- Returns:
- Arrow IPC file / Feather v2 bytes
-
close
public void close()Close this table and any open row cursors owned by it.- Specified by:
closein interfaceAutoCloseable
-
registerChild
public void registerChild(ai.velr.ChildHandle child) Driver-internal child-handle registration method. -
unregisterChild
public void unregisterChild(ai.velr.ChildHandle child) Driver-internal child-handle unregistration method.
-