Interface RowReader

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
BitSetRowReader

public interface RowReader extends AutoCloseable
Zero-copy columnar cursor for iterating over graph query results.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
     
    int
    Returns the total number of columns in the result set.
    getColumnName(int columnIndex)
    Returns the name of the column at the given 0-indexed position.
    double
    getDouble(int columnIndex)
    Obtains the double-precision float at the given 0-indexed column.
    double
    getDouble(String columnName)
    Obtains the double-precision float for the given column name.
    long
    getLong(int columnIndex)
    Obtains the 64-bit integer at the given 0-indexed column.
    long
    getLong(String columnName)
    Obtains the 64-bit integer for the given column name.
    long
    getNodeId(int columnIndex)
    Obtains the dense node ID at the given 0-indexed column.
    long
    getNodeId(String columnName)
    Obtains the dense node ID for the given column name.
    getString(int columnIndex)
    Obtains the string value at the given 0-indexed column.
    getString(String columnName)
    Obtains the string value for the given column name.
    boolean
    Advances cursor to the next row.
    long
    Returns total row count if known, or -1.
    default Stream<RowReader>
    Returns a sequential stream of rows for terminal consumption.
  • Method Details

    • next

      boolean next()
      Advances cursor to the next row.
      Returns:
      true if another row exists; false if iteration is complete
    • getNodeId

      long getNodeId(int columnIndex)
      Obtains the dense node ID at the given 0-indexed column.
    • getNodeId

      long getNodeId(String columnName)
      Obtains the dense node ID for the given column name.
    • getLong

      long getLong(int columnIndex)
      Obtains the 64-bit integer at the given 0-indexed column.
    • getLong

      long getLong(String columnName)
      Obtains the 64-bit integer for the given column name.
    • getDouble

      double getDouble(int columnIndex)
      Obtains the double-precision float at the given 0-indexed column.
    • getDouble

      double getDouble(String columnName)
      Obtains the double-precision float for the given column name.
    • getString

      String getString(int columnIndex)
      Obtains the string value at the given 0-indexed column.
    • getString

      String getString(String columnName)
      Obtains the string value for the given column name.
    • getColumnCount

      int getColumnCount()
      Returns the total number of columns in the result set.
    • getColumnName

      String getColumnName(int columnIndex)
      Returns the name of the column at the given 0-indexed position.
    • rowCount

      long rowCount()
      Returns total row count if known, or -1.
    • stream

      default Stream<RowReader> stream()
      Returns a sequential stream of rows for terminal consumption.

      WARNING: The RowReader instance is a mutable flyweight cursor. Do NOT collect the raw RowReader instances into a list or use parallel streams, as they will all reference the mutated state. Instead, map the row to an immutable record/DTO immediately within the stream pipeline.

      Filtering should ideally be done natively via the VM query instead of client-side stream filters.

    • close

      default void close()
      Specified by:
      close in interface AutoCloseable