Interface StructMetaData
-
- All Superinterfaces:
java.sql.Wrapper
- All Known Subinterfaces:
RelationalResultSetMetaData
- All Known Implementing Classes:
RelationalStructMetaData
,StructResultSetMetaData
public interface StructMetaData extends java.sql.Wrapper
Metadata describing what is in aRelationalStruct
. AsResultSetMetaData
is forResultSet
, so is this Interface for instances ofStruct
. The below is modeled on -- and a subset of --ResultSetMetaData
with a few extras such asgetStructMetaData(int)
,getArrayMetaData(int)
andgetLeadingPhantomColumnCount()
. Types returned bygetColumnType(int)
areTypes
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ArrayMetaData
getArrayMetaData(int oneBasedColumn)
Get the Metadata for an array type.java.lang.String
getCatalogName(int oneBasedColumn)
int
getColumnCount()
java.lang.String
getColumnLabel(int oneBasedColumn)
java.lang.String
getColumnName(int oneBasedColumn)
int
getColumnType(int oneBasedColumn)
java.lang.String
getColumnTypeName(int oneBasedColumn)
default int
getLeadingPhantomColumnCount()
java.lang.String
getSchemaName(int oneBasedColumn)
StructMetaData
getStructMetaData(int oneBasedColumn)
Get the Metadata for a nested struct type.java.lang.String
getTableName(int oneBasedColumn)
java.lang.String
getTypeName()
Returns the name of the struct type.int
isNullable(int oneBasedColumn)
-
-
-
Method Detail
-
getTypeName
java.lang.String getTypeName() throws java.sql.SQLException
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:
java.sql.SQLException
-
getColumnCount
int getColumnCount() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
isNullable
int isNullable(int oneBasedColumn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getColumnLabel
java.lang.String getColumnLabel(int oneBasedColumn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getColumnName
java.lang.String getColumnName(int oneBasedColumn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getSchemaName
java.lang.String getSchemaName(int oneBasedColumn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getTableName
java.lang.String getTableName(int oneBasedColumn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getCatalogName
java.lang.String getCatalogName(int oneBasedColumn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getColumnType
int getColumnType(int oneBasedColumn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getColumnTypeName
java.lang.String getColumnTypeName(int oneBasedColumn) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getStructMetaData
StructMetaData getStructMetaData(int oneBasedColumn) throws java.sql.SQLException
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:
java.sql.SQLException
- if the type of the column is not a struct, or if something else goes wrong.
-
getArrayMetaData
ArrayMetaData getArrayMetaData(int oneBasedColumn) throws java.sql.SQLException
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:
java.sql.SQLException
- if the type of the column is not an array, or if something else goes wrong.
-
getLeadingPhantomColumnCount
default int getLeadingPhantomColumnCount()
-
-