org.eigenbase.sql.type
Class ObjectSqlType
java.lang.Object
org.eigenbase.reltype.RelDataTypeImpl
org.eigenbase.sql.type.AbstractSqlType
org.eigenbase.sql.type.ObjectSqlType
- All Implemented Interfaces:
- Serializable, Cloneable, RelDataType, RelDataTypeFamily
public class ObjectSqlType
- extends AbstractSqlType
ObjectSqlType represents an SQL structured user-defined type.
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/type/ObjectSqlType.java#11 $
- Author:
- John V. Sichi
- See Also:
- Serialized Form
Methods inherited from class org.eigenbase.reltype.RelDataTypeImpl |
computeDigest, equals, getCharset, getCollation, getComponentType, getField, getFieldCount, getFieldList, getFieldOrdinal, getFields, getFullTypeString, getIntervalQualifier, getPrecision, getScale, hashCode, isStruct, toString |
sqlIdentifier
private final SqlIdentifier sqlIdentifier
comparability
private final RelDataTypeComparability comparability
family
private RelDataTypeFamily family
ObjectSqlType
public ObjectSqlType(SqlTypeName typeName,
SqlIdentifier sqlIdentifier,
boolean nullable,
RelDataTypeField[] fields,
RelDataTypeComparability comparability)
- Constructs an object type. This should only be called from a factory
method.
- Parameters:
typeName
- SqlTypeName for this type (either Distinct or Structured)sqlIdentifier
- identifier for this typenullable
- whether type accepts nullsfields
- object attribute definitions
setFamily
public void setFamily(RelDataTypeFamily family)
getComparability
public RelDataTypeComparability getComparability()
- Specified by:
getComparability
in interface RelDataType
- Overrides:
getComparability
in class RelDataTypeImpl
- Returns:
- the category of comparison operators which make sense when
applied to values of this type
getSqlIdentifier
public SqlIdentifier getSqlIdentifier()
- Description copied from interface:
RelDataType
- Gets the
SqlIdentifier
associated with this type. For a
predefined type, this is a simple identifier based on RelDataType.getSqlTypeName()
. For a user-defined type, this is a compound identifier
which uniquely names the type.
- Specified by:
getSqlIdentifier
in interface RelDataType
- Overrides:
getSqlIdentifier
in class RelDataTypeImpl
- Returns:
- SqlIdentifier, or null if this is not an SQL type
getFamily
public RelDataTypeFamily getFamily()
- Description copied from interface:
RelDataType
- Gets a canonical object representing the family of this type. Two values
can be compared if and only if their types are in the same family.
- Specified by:
getFamily
in interface RelDataType
- Overrides:
getFamily
in class AbstractSqlType
- Returns:
- canonical object representing type family
generateTypeString
protected void generateTypeString(StringBuilder sb,
boolean withDetail)
- Description copied from class:
RelDataTypeImpl
- Generates a string representation of this type.
- Specified by:
generateTypeString
in class RelDataTypeImpl
- Parameters:
sb
- StringBuffer into which to generate the stringwithDetail
- when true, all detail information needed to compute a
unique digest (and return from getFullTypeString) should be included;