org.eigenbase.sql.type
Class AbstractSqlType
java.lang.Object
org.eigenbase.reltype.RelDataTypeImpl
org.eigenbase.sql.type.AbstractSqlType
- All Implemented Interfaces:
- Serializable, Cloneable, RelDataType, RelDataTypeFamily
- Direct Known Subclasses:
- BasicSqlType, IntervalSqlType, MultisetSqlType, ObjectSqlType
public abstract class AbstractSqlType
- extends RelDataTypeImpl
- implements Cloneable, Serializable
Abstract base class for SQL implementations of RelDataType
.
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/type/AbstractSqlType.java#14 $
- Author:
- jhyde
- See Also:
- Serialized Form
Methods inherited from class org.eigenbase.reltype.RelDataTypeImpl |
computeDigest, equals, generateTypeString, getCharset, getCollation, getComparability, getComponentType, getField, getFieldCount, getFieldList, getFieldOrdinal, getFields, getFullTypeString, getIntervalQualifier, getPrecision, getScale, getSqlIdentifier, hashCode, isStruct, toString |
typeName
protected final SqlTypeName typeName
isNullable
protected boolean isNullable
AbstractSqlType
protected AbstractSqlType(SqlTypeName typeName,
boolean isNullable,
RelDataTypeField[] fields)
- Creates an AbstractSqlType.
- Parameters:
typeName
- Type nameisNullable
- Whether nullablefields
- Fields of type, or null if not a record type
getSqlTypeName
public SqlTypeName getSqlTypeName()
- Description copied from interface:
RelDataType
- Gets the
SqlTypeName
of this type.
- Specified by:
getSqlTypeName
in interface RelDataType
- Overrides:
getSqlTypeName
in class RelDataTypeImpl
- Returns:
- SqlTypeName, or null if this is not an SQL predefined type
isNullable
public boolean isNullable()
- Description copied from interface:
RelDataType
- Queries whether this type allows null values.
- Specified by:
isNullable
in interface RelDataType
- Overrides:
isNullable
in class RelDataTypeImpl
- Returns:
- whether type allows null values
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 RelDataTypeImpl
- Returns:
- canonical object representing type family
getPrecedenceList
public RelDataTypePrecedenceList getPrecedenceList()
- Specified by:
getPrecedenceList
in interface RelDataType
- Overrides:
getPrecedenceList
in class RelDataTypeImpl
- Returns:
- precedence list for this type