Class RelationalStructMetaData
- java.lang.Object
-
- com.apple.foundationdb.relational.api.RelationalStructMetaData
-
- All Implemented Interfaces:
StructMetaData
,java.sql.Wrapper
@API(EXPERIMENTAL) public class RelationalStructMetaData extends java.lang.Object implements StructMetaData
-
-
Constructor Summary
Constructors Constructor Description RelationalStructMetaData(FieldDescription... columns)
RelationalStructMetaData(java.lang.String name, FieldDescription... columns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
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)
java.util.List<FieldDescription>
getFields()
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
hashCode()
int
isNullable(int oneBasedColumn)
boolean
isWrapperFor(java.lang.Class<?> iface)
<T> T
unwrap(java.lang.Class<T> iface)
-
-
-
Constructor Detail
-
RelationalStructMetaData
public RelationalStructMetaData(FieldDescription... columns)
-
RelationalStructMetaData
public RelationalStructMetaData(@Nonnull java.lang.String name, FieldDescription... columns)
-
-
Method Detail
-
getTypeName
public java.lang.String getTypeName()
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.
-
getColumnCount
public int getColumnCount() throws java.sql.SQLException
- Specified by:
getColumnCount
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
isNullable
public int isNullable(int oneBasedColumn) throws java.sql.SQLException
- Specified by:
isNullable
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getColumnLabel
public java.lang.String getColumnLabel(int oneBasedColumn) throws java.sql.SQLException
- Specified by:
getColumnLabel
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getColumnName
public java.lang.String getColumnName(int oneBasedColumn) throws java.sql.SQLException
- Specified by:
getColumnName
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getSchemaName
public java.lang.String getSchemaName(int oneBasedColumn) throws java.sql.SQLException
- Specified by:
getSchemaName
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getTableName
public java.lang.String getTableName(int oneBasedColumn) throws java.sql.SQLException
- Specified by:
getTableName
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getCatalogName
public java.lang.String getCatalogName(int oneBasedColumn) throws java.sql.SQLException
- Specified by:
getCatalogName
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getColumnType
public int getColumnType(int oneBasedColumn) throws java.sql.SQLException
- Specified by:
getColumnType
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
getColumnTypeName
public java.lang.String getColumnTypeName(int oneBasedColumn) throws java.sql.SQLException
- Specified by:
getColumnTypeName
in interfaceStructMetaData
- Throws:
java.sql.SQLException
-
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.
-
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.
-
getLeadingPhantomColumnCount
public int getLeadingPhantomColumnCount()
- Specified by:
getLeadingPhantomColumnCount
in interfaceStructMetaData
-
unwrap
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
- Specified by:
unwrap
in interfacejava.sql.Wrapper
- Throws:
java.sql.SQLException
-
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> iface)
- Specified by:
isWrapperFor
in interfacejava.sql.Wrapper
-
getFields
@Nonnull public java.util.List<FieldDescription> getFields()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-