Class StructResultSetMetaData
- java.lang.Object
-
- com.apple.foundationdb.relational.api.StructResultSetMetaData
-
- All Implemented Interfaces:
RelationalResultSetMetaData
,StructMetaData
,java.sql.ResultSetMetaData
,java.sql.Wrapper
@API(EXPERIMENTAL) public class StructResultSetMetaData extends java.lang.Object implements RelationalResultSetMetaData
-
-
Constructor Summary
Constructors Constructor Description StructResultSetMetaData(StructMetaData metaData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayMetaData
getArrayMetaData(int oneBasedColumn)
Get the Metadata for an array type.int
getColumnCount()
java.lang.String
getColumnLabel(int column)
java.lang.String
getColumnName(int column)
int
getColumnType(int column)
java.lang.String
getColumnTypeName(int column)
StructMetaData
getStructMetaData(int oneBasedColumn)
Get the Metadata for a nested struct type.java.lang.String
getTypeName()
Returns the name of the struct type.int
isNullable(int oneBasedColumn)
<T> T
unwrap(java.lang.Class<T> iface)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.apple.foundationdb.relational.api.RelationalResultSetMetaData
getCatalogName, getColumnClassName, getColumnDisplaySize, getPrecision, getScale, getSchemaName, getTableName, isAutoIncrement, isCaseSensitive, isCurrency, isDefinitelyWritable, isReadOnly, isSearchable, isSigned, isWrapperFor, isWritable
-
Methods inherited from interface com.apple.foundationdb.relational.api.StructMetaData
getLeadingPhantomColumnCount
-
-
-
-
Constructor Detail
-
StructResultSetMetaData
public StructResultSetMetaData(StructMetaData metaData)
-
-
Method Detail
-
getTypeName
public java.lang.String getTypeName() throws java.sql.SQLException
Description copied from interface:StructMetaData
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
.- Specified by:
getTypeName
in interfaceStructMetaData
- Returns:
- The name of the struct type.
- Throws:
java.sql.SQLException
-
getColumnCount
public int getColumnCount() throws java.sql.SQLException
- Specified by:
getColumnCount
in interfacejava.sql.ResultSetMetaData
- Specified by:
getColumnCount
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getColumnName
public java.lang.String getColumnName(int column) throws java.sql.SQLException
- Specified by:
getColumnName
in interfacejava.sql.ResultSetMetaData
- Specified by:
getColumnName
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getColumnLabel
public java.lang.String getColumnLabel(int column) throws java.sql.SQLException
- Specified by:
getColumnLabel
in interfaceRelationalResultSetMetaData
- Specified by:
getColumnLabel
in interfacejava.sql.ResultSetMetaData
- Specified by:
getColumnLabel
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getColumnType
public int getColumnType(int column) throws java.sql.SQLException
- Specified by:
getColumnType
in interfacejava.sql.ResultSetMetaData
- Specified by:
getColumnType
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getColumnTypeName
public java.lang.String getColumnTypeName(int column) throws java.sql.SQLException
- Specified by:
getColumnTypeName
in interfaceRelationalResultSetMetaData
- Specified by:
getColumnTypeName
in interfacejava.sql.ResultSetMetaData
- Specified by:
getColumnTypeName
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getArrayMetaData
public ArrayMetaData getArrayMetaData(int oneBasedColumn) throws java.sql.SQLException
Description copied from interface:StructMetaData
Get the Metadata for an array type. If the column is not an array type, this will throw an error.- Specified by:
getArrayMetaData
in interfaceStructMetaData
- 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.
-
getStructMetaData
public StructMetaData getStructMetaData(int oneBasedColumn) throws java.sql.SQLException
Description copied from interface:StructMetaData
Get the Metadata for a nested struct type. If the column is not a struct type, this will throw an error.- Specified by:
getStructMetaData
in interfaceStructMetaData
- 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.
-
isNullable
public int isNullable(int oneBasedColumn) throws java.sql.SQLException
- Specified by:
isNullable
in interfaceRelationalResultSetMetaData
- Specified by:
isNullable
in interfacejava.sql.ResultSetMetaData
- Specified by:
isNullable
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
- Specified by:
unwrap
in interfaceRelationalResultSetMetaData
- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
-