Interface StructMetaData
- All Superinterfaces:
Wrapper
- All Known Subinterfaces:
RelationalResultSetMetaData
- All Known Implementing Classes:
RelationalStructMetaData
,StructResultSetMetaData
Metadata describing what is in a
RelationalStruct
.
As ResultSetMetaData
is for ResultSet
, so is this Interface for instances of
Struct
. The below is modeled on -- and a subset of -- ResultSetMetaData
with a
few extras such as getStructMetaData(int)
, getArrayMetaData(int)
and getLeadingPhantomColumnCount()
.
Types returned by getColumnType(int)
are Types
.-
Method Summary
Modifier and TypeMethodDescriptiongetArrayMetaData
(int oneBasedColumn) Get the Metadata for an array type.getCatalogName
(int oneBasedColumn) int
getColumnLabel
(int oneBasedColumn) getColumnName
(int oneBasedColumn) int
getColumnType
(int oneBasedColumn) getColumnTypeName
(int oneBasedColumn) default int
getSchemaName
(int oneBasedColumn) getStructMetaData
(int oneBasedColumn) Get the Metadata for a nested struct type.getTableName
(int oneBasedColumn) Returns the name of the struct type.int
isNullable
(int oneBasedColumn) Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
getTypeName
Returns the name of the struct type. The user can set the struct type name in SQL explicitly by usingstruct <name> (...)
clause.
For example:SELECT struct Foo (a, b) from T
will give the struct(a, b)
the namefoo
.- Returns:
- The name of the struct type.
- Throws:
SQLException
-
getColumnCount
- Throws:
SQLException
-
isNullable
- Throws:
SQLException
-
getColumnLabel
- Throws:
SQLException
-
getColumnName
- Throws:
SQLException
-
getSchemaName
- Throws:
SQLException
-
getTableName
- Throws:
SQLException
-
getCatalogName
- Throws:
SQLException
-
getColumnType
- Throws:
SQLException
-
getColumnTypeName
- Throws:
SQLException
-
getStructMetaData
Get the Metadata for a nested struct type. If the column is not a struct type, this will throw an error.- Parameters:
oneBasedColumn
- the position of the column, indexed at 1- Returns:
- the metadata for the struct at column
oneBasedColumn
- Throws:
SQLException
- if the type of the column is not a struct, or if something else goes wrong.
-
getArrayMetaData
Get the Metadata for an array type. If the column is not an array type, this will throw an error.- Parameters:
oneBasedColumn
- the position of the column, indexed at 1- Returns:
- the metadata for the array at column
oneBasedColumn
- Throws:
SQLException
- if the type of the column is not an array, or if something else goes wrong.
-
getLeadingPhantomColumnCount
default int getLeadingPhantomColumnCount()
-