Interface ResultSetMetadata


@BetaApi public interface ResultSetMetadata
Provides information about the schema of a ResultSet.
  • Method Details

    • getColumns

      List<ColumnMetadata> getColumns()
      Returns:
      full list of ColumnMetadata for each column in the ResultSet.
    • getColumnType

      SqlType<?> getColumnType(int columnIndex)
      Parameters:
      columnIndex - index of the column
      Returns:
      the SqlType of the column at the given index
    • getColumnType

      SqlType<?> getColumnType(String columnName)
      Parameters:
      columnName - name of the column
      Returns:
      the SqlType of the column with the given name
      Throws:
      IllegalArgumentException - if there is no column with the name *or* if there are multiple columns with the given name
    • getColumnIndex

      int getColumnIndex(String columnName)
      Parameters:
      columnName - name of the column
      Returns:
      index of the column with the given name
      Throws:
      IllegalArgumentException - if there is no column with the name *or* if there are multiple columns with the given name