Interface Row

All Superinterfaces:
Tuple

public interface Row extends Tuple
A single row of the execution result rowset.
  • Method Details

    • getColumnName

      String getColumnName(int pos)
      Get a column name at pos.
      Parameters:
      pos - the column position
      Returns:
      the column name or null
    • getColumnIndex

      int getColumnIndex(String column)
      Get a column position for the given @code column}.
      Parameters:
      column - the column name
      Returns:
      the column name or -1 if not found
    • getValue

      default Object getValue(String column)
      Get a value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getBoolean

      default Boolean getBoolean(String column)
      Get a boolean value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getByte

      default Byte getByte(String column)
      Get a byte value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getShort

      default Short getShort(String column)
      Get a short value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getInteger

      default Integer getInteger(String column)
      Get an integer value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getLong

      default Long getLong(String column)
      Get a long value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getFloat

      default Float getFloat(String column)
      Get a float value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getDouble

      default Double getDouble(String column)
      Get a double value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getNumeric

      default Numeric getNumeric(String column)
      Get Numeric value for the given column.
      Parameters:
      column - the column
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getString

      default String getString(String column)
      Get a string value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getJson

      default Object getJson(String column)
      Get a JSON element for the given column, the element might be null or one of the following types:
      • String
      • Number
      • JsonObject
      • JsonArray
      • Boolean
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getJsonObject

      default JsonObject getJsonObject(String column)
      Get a JsonObject value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getJsonArray

      default JsonArray getJsonArray(String column)
      Get a JsonArray value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getTemporal

      default Temporal getTemporal(String column)
      Get a temporal value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getLocalDate

      default LocalDate getLocalDate(String column)
      Get LocalDate value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getLocalTime

      default LocalTime getLocalTime(String column)
      Get LocalTime value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getLocalDateTime

      default LocalDateTime getLocalDateTime(String column)
      Get LocalDateTime value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getOffsetTime

      default OffsetTime getOffsetTime(String column)
      Get OffsetTime value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getOffsetDateTime

      default OffsetDateTime getOffsetDateTime(String column)
      Get OffsetDateTime value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getBuffer

      default Buffer getBuffer(String column)
      Get a buffer value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getUUID

      default UUID getUUID(String column)
      Get UUID value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getBigDecimal

      default BigDecimal getBigDecimal(String column)
      Get BigDecimal value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfBooleans

      default Boolean[] getArrayOfBooleans(String column)
      Get an array of Boolean value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfBytes

      default Byte[] getArrayOfBytes(String column)
      Get an array of Byte value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfShorts

      default Short[] getArrayOfShorts(String column)
      Get an array of Short value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfIntegers

      default Integer[] getArrayOfIntegers(String column)
      Get an array of Integer value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfLongs

      default Long[] getArrayOfLongs(String column)
      Get an array of Long value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfFloats

      default Float[] getArrayOfFloats(String column)
      Get an array of Float value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfDoubles

      default Double[] getArrayOfDoubles(String column)
      Get an array of Double value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfNumerics

      default Numeric[] getArrayOfNumerics(String column)
      Get an array of Numeric value for the given column.
      Parameters:
      column - the column
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfStrings

      default String[] getArrayOfStrings(String column)
      Get an array of String value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfJsonObjects

      default JsonObject[] getArrayOfJsonObjects(String column)
      Get an array of JsonObject value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfJsonArrays

      default JsonArray[] getArrayOfJsonArrays(String column)
      Get an array of JsonArray value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfTemporals

      default Temporal[] getArrayOfTemporals(String column)
      Get an array of Temporal value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfLocalDates

      default LocalDate[] getArrayOfLocalDates(String column)
      Get an array of LocalDate value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfLocalTimes

      default LocalTime[] getArrayOfLocalTimes(String column)
      Get an array of LocalTime value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfLocalDateTimes

      default LocalDateTime[] getArrayOfLocalDateTimes(String column)
      Get an array of LocalDateTime value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfOffsetTimes

      default OffsetTime[] getArrayOfOffsetTimes(String column)
      Get an array of OffsetTime value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfOffsetDateTimes

      default OffsetDateTime[] getArrayOfOffsetDateTimes(String column)
      Get an array of OffsetDateTime value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfBuffers

      default Buffer[] getArrayOfBuffers(String column)
      Get an array of Buffer value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfUUIDs

      default UUID[] getArrayOfUUIDs(String column)
      Get an array of UUID value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfBigDecimals

      default BigDecimal[] getArrayOfBigDecimals(String column)
      Get an array of BigDecimal value for the given column.
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • getArrayOfJsons

      default Object[] getArrayOfJsons(String column)
      Get an array of JSON elements for the given column, the element might be null or one of the following types:
      • String
      • Number
      • JsonObject
      • JsonArray
      • Boolean
      Parameters:
      column - the column name
      Returns:
      the column value
      Throws:
      NoSuchElementException - when the column does not exist
    • get

      default <T> T get(Class<T> type, String column)
      Like Tuple.get(Class, int) but specifying the column instead of the position.
    • toJson

      default JsonObject toJson()
      Return a JSON object representation of the row.

      Column names are mapped to JSON keys.

      The following rules are applied for the column values:

      • number, boolean and string are preserved
      • the null value is preserved
      • JSON elements are preserved
      • Buffer are converted to base64 encoded strings
      • array is mapped JsonArray
      • otherwise the type converted to a string
      Returns:
      the json representation
    • release

      default void release()
      Signal the row can be recycled, this is only effective when dealing with a row in a collector query and the row has already been processed and transformed.