Package org.apache.calcite.sql.type
Enum SqlTypeFamily
- java.lang.Object
-
- java.lang.Enum<SqlTypeFamily>
-
- org.apache.calcite.sql.type.SqlTypeFamily
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SqlTypeFamily>
,RelDataTypeFamily
public enum SqlTypeFamily extends java.lang.Enum<SqlTypeFamily> implements RelDataTypeFamily
SqlTypeFamily provides SQL type categorization.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().
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANY
APPROXIMATE_NUMERIC
ARRAY
BINARY
BOOLEAN
CHARACTER
COLUMN_LIST
CURSOR
DATE
DATETIME
DATETIME_INTERVAL
EXACT_NUMERIC
GEO
INTEGER
INTERVAL_DAY_TIME
INTERVAL_YEAR_MONTH
MAP
MULTISET
NULL
NUMERIC
STRING
TIME
TIMESTAMP
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.Integer,SqlTypeFamily>
JDBC_TYPE_TO_FAMILY
-
Constructor Summary
Constructors Modifier Constructor Description private
SqlTypeFamily()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(RelDataType type)
static SqlTypeFamily
getFamilyForJdbcType(int jdbcType)
Gets the primary family containing a JDBC type.java.util.Collection<SqlTypeName>
getTypeNames()
static SqlTypeFamily
valueOf(java.lang.String name)
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 Detail
-
CHARACTER
public static final SqlTypeFamily CHARACTER
-
BINARY
public static final SqlTypeFamily BINARY
-
NUMERIC
public static final SqlTypeFamily NUMERIC
-
DATE
public static final SqlTypeFamily DATE
-
TIME
public static final SqlTypeFamily TIME
-
TIMESTAMP
public static final SqlTypeFamily TIMESTAMP
-
BOOLEAN
public static final SqlTypeFamily BOOLEAN
-
INTERVAL_YEAR_MONTH
public static final SqlTypeFamily INTERVAL_YEAR_MONTH
-
INTERVAL_DAY_TIME
public static final SqlTypeFamily INTERVAL_DAY_TIME
-
STRING
public static final SqlTypeFamily STRING
-
APPROXIMATE_NUMERIC
public static final SqlTypeFamily APPROXIMATE_NUMERIC
-
EXACT_NUMERIC
public static final SqlTypeFamily EXACT_NUMERIC
-
INTEGER
public static final SqlTypeFamily INTEGER
-
DATETIME
public static final SqlTypeFamily DATETIME
-
DATETIME_INTERVAL
public static final SqlTypeFamily DATETIME_INTERVAL
-
MULTISET
public static final SqlTypeFamily MULTISET
-
ARRAY
public static final SqlTypeFamily ARRAY
-
MAP
public static final SqlTypeFamily MAP
-
NULL
public static final SqlTypeFamily NULL
-
ANY
public static final SqlTypeFamily ANY
-
CURSOR
public static final SqlTypeFamily CURSOR
-
COLUMN_LIST
public static final SqlTypeFamily COLUMN_LIST
-
GEO
public static final SqlTypeFamily GEO
-
-
Field Detail
-
JDBC_TYPE_TO_FAMILY
private static final java.util.Map<java.lang.Integer,SqlTypeFamily> JDBC_TYPE_TO_FAMILY
-
-
Method Detail
-
values
public static SqlTypeFamily[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SqlTypeFamily c : SqlTypeFamily.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SqlTypeFamily valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getFamilyForJdbcType
public static SqlTypeFamily getFamilyForJdbcType(int jdbcType)
Gets the primary family containing a JDBC type.- Parameters:
jdbcType
- the JDBC type of interest- Returns:
- containing family
-
getTypeNames
public java.util.Collection<SqlTypeName> getTypeNames()
- Returns:
- collection of
SqlTypeName
s included in this family
-
contains
public boolean contains(RelDataType type)
-
-