Interface ResultSetMetadata
public interface ResultSetMetadata
Provides information about the schema of a
ResultSet.-
Method Summary
Modifier and TypeMethodDescriptionintgetColumnIndex(String columnName) SqlType<?>getColumnType(int columnIndex) SqlType<?>getColumnType(String columnName)
-
Method Details
-
getColumns
List<ColumnMetadata> getColumns()- Returns:
- full list of
ColumnMetadatafor each column in theResultSet.
-
getColumnType
- Parameters:
columnIndex- index of the column- Returns:
- the
SqlTypeof the column at the given index
-
getColumnType
- Parameters:
columnName- name of the column- Returns:
- the
SqlTypeof 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
- 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
-