Class SqlRowMetadata

java.lang.Object
com.hazelcast.sql.SqlRowMetadata

public final class SqlRowMetadata extends Object
SQL row metadata.
  • Field Details

    • COLUMN_NOT_FOUND

      public static final int COLUMN_NOT_FOUND
      Constant indicating that the column is not found.
      See Also:
  • Constructor Details

  • Method Details

    • getColumnCount

      public int getColumnCount()
      Gets the number of columns in the row.
      Returns:
      the number of columns in the row
    • getColumn

      @Nonnull public SqlColumnMetadata getColumn(int index)
      Gets column metadata.
      Parameters:
      index - column index, zero-based
      Returns:
      column metadata
      Throws:
      IndexOutOfBoundsException - If the column index is out of bounds
    • getColumns

      @Nonnull public List<SqlColumnMetadata> getColumns()
      Gets columns metadata.
      Returns:
      columns metadata
    • findColumn

      public int findColumn(@Nonnull String columnName)
      Find index of the column with the given name. Returned index can be used to get column value from SqlRow.
      Parameters:
      columnName - column name (case sensitive)
      Returns:
      column index or COLUMN_NOT_FOUND if a column with the given name is not found
      Throws:
      NullPointerException - if column name is null
      See Also:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object