Enum SqlTypeFamily
- All Implemented Interfaces:
Serializable
,Comparable<SqlTypeFamily>
,Constable
,RelDataTypeFamily
The primary family categorization is a complete disjoint
partitioning of SQL types into families, where two types are members of the
same primary family iff instances of the two types can be the operands of an
SQL equality predicate such as WHERE v1 = v2
. Primary families
are returned by RelDataType.getFamily().
There is also a secondary family categorization which overlaps with the primary categorization. It is used in type strategies for more specific or more general categorization than the primary families. Secondary families are never returned by RelDataType.getFamily().
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionLike ANY, but do not even validate the operand. -
Method Summary
Modifier and TypeMethodDescriptionFor this type family, returns the allow types of the difference between two values of this family.boolean
contains
(RelDataType type) @Nullable RelDataType
getDefaultConcreteType
(RelDataTypeFactory factory) Return the defaultRelDataType
that belongs to this family.static @Nullable SqlTypeFamily
getFamilyForJdbcType
(int jdbcType) Gets the primary family containing a JDBC type.Returns the collection ofSqlTypeName
s included in this family.static SqlTypeFamily
Returns the enum constant of this type with the specified name.static SqlTypeFamily[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CHARACTER
-
BINARY
-
NUMERIC
-
DATE
-
TIME
-
TIMESTAMP
-
BOOLEAN
-
INTERVAL_YEAR_MONTH
-
INTERVAL_DAY_TIME
-
STRING
-
APPROXIMATE_NUMERIC
-
EXACT_NUMERIC
-
DECIMAL
-
INTEGER
-
DATETIME
-
DATETIME_INTERVAL
-
MULTISET
-
ARRAY
-
MAP
-
NULL
-
ANY
-
CURSOR
-
COLUMN_LIST
-
GEO
-
FUNCTION
-
IGNORE
Like ANY, but do not even validate the operand. It may not be an expression.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getFamilyForJdbcType
Gets the primary family containing a JDBC type.- Parameters:
jdbcType
- the JDBC type of interest- Returns:
- containing family
-
allowableDifferenceTypes
For this type family, returns the allow types of the difference between two values of this family.Equivalently, given an
ORDER BY
expression with one key, returns the allowable type families of the difference between two keys.Example 1. For
ORDER BY empno
, a NUMERIC, the difference between twoempno
values is also NUMERIC.Example 2. For
ORDER BY hireDate
, a DATE, the difference between twohireDate
values might be an INTERVAL_DAY_TIME or INTERVAL_YEAR_MONTH.The result determines whether a
SqlWindow
with aRANGE
is valid (for example,OVER (ORDER BY empno RANGE 10
is valid because10
is numeric); and whether a call toPERCENTILE_CONT
is valid (for example,PERCENTILE_CONT(0.25)
ORDER BY (hireDate)} is valid becausehireDate
values may be interpolated by adding values of typeINTERVAL_DAY_TIME
. -
getTypeNames
Returns the collection ofSqlTypeName
s included in this family. -
getDefaultConcreteType
Return the defaultRelDataType
that belongs to this family. -
contains
-