Class XProtocolRow

java.lang.Object
com.mysql.cj.protocol.x.XProtocolRow
All Implemented Interfaces:
ProtocolEntity, Row

public class XProtocolRow
extends java.lang.Object
implements Row
ProtocolEntity representing an X Protocol result row.
  • Constructor Summary

    Constructors 
    Constructor Description
    XProtocolRow​(MysqlxResultset.Row rowMessage)  
  • Method Summary

    Modifier and Type Method Description
    boolean getNull​(int columnIndex)
    Check whether a column is NULL and update the 'wasNull' status.
    <T> T getValue​(int columnIndex, ValueFactory<T> vf)
    Retrieve a value for the given column.
    Row setMetadata​(ColumnDefinition columnDefinition)
    Set metadata to enable getValue functionality.
    boolean wasNull()
    Was the last value retrieved a NULL value?

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.mysql.cj.result.Row

    getBytes, setBytes
  • Constructor Details

  • Method Details

    • setMetadata

      public Row setMetadata​(ColumnDefinition columnDefinition)
      Description copied from interface: Row
      Set metadata to enable getValue functionality.
      Specified by:
      setMetadata in interface Row
      Parameters:
      columnDefinition - ColumnDefinition
      Returns:
      Row
    • getValue

      public <T> T getValue​(int columnIndex, ValueFactory<T> vf)
      Description copied from interface: Row
      Retrieve a value for the given column. This is the main facility to access values from the Row involving ValueDecoder and ValueFactory chain. Metadata must be set via Row constructor or Row.setMetadata(ColumnDefinition) call before calling this method to allow correct columnIndex boundaries check and data type recognition.
      Specified by:
      getValue in interface Row
      Type Parameters:
      T - type to decode to
      Parameters:
      columnIndex - index of column to retrieve value from (0-indexed, not JDBC 1-indexed)
      vf - value factory used to create the return value after decoding
      Returns:
      The return value from the value factory
    • getNull

      public boolean getNull​(int columnIndex)
      Description copied from interface: Row
      Check whether a column is NULL and update the 'wasNull' status.
      Specified by:
      getNull in interface Row
      Parameters:
      columnIndex - of the column value (starting at 0) to check.
      Returns:
      true if the column value is NULL, false if not.
    • wasNull

      public boolean wasNull()
      Description copied from interface: Row
      Was the last value retrieved a NULL value?
      Specified by:
      wasNull in interface Row
      Returns:
      true if the last retrieved value was NULL.