Package org.apache.calcite.avatica
Enum ColumnMetaData.Rep
- All Implemented Interfaces:
Serializable,Comparable<ColumnMetaData.Rep>,java.lang.constant.Constable
- Enclosing class:
- ColumnMetaData
Description of the type used to internally represent a value. For example,
a
Date might be represented as a PRIMITIVE_INT
if not nullable, or a JAVA_SQL_DATE.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ColumnMetaData.RepfromProto(org.apache.calcite.avatica.proto.Common.Rep proto) Returns the value of a column of this type from a result set.static ColumnMetaData.RepnonPrimitiveRepOf(SqlType type) Computes the given JDBC type for a primitive to the correspondingColumnMetaData.Repfor the equivalent Object type.static ColumnMetaData.Repstatic ColumnMetaData.RepserialRepOf(SqlType type) Computes the given JDBC type into theColumnMetaData.Repfor the wire (serial) form of that type.org.apache.calcite.avatica.proto.Common.ReptoProto()static ColumnMetaData.RepReturns the enum constant of this type with the specified name.static ColumnMetaData.Rep[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PRIMITIVE_BOOLEAN
-
PRIMITIVE_BYTE
-
PRIMITIVE_CHAR
-
PRIMITIVE_SHORT
-
PRIMITIVE_INT
-
PRIMITIVE_LONG
-
PRIMITIVE_FLOAT
-
PRIMITIVE_DOUBLE
-
BOOLEAN
-
BYTE
-
CHARACTER
-
SHORT
-
INTEGER
-
LONG
-
FLOAT
-
DOUBLE
-
JAVA_SQL_TIME
-
JAVA_SQL_TIMESTAMP
-
JAVA_SQL_DATE
-
JAVA_UTIL_DATE
-
BYTE_STRING
-
STRING
-
NUMBER
Values are represented as some sub-class ofNumber. The JSON encoding does this. -
ARRAY
-
MULTISET
-
STRUCT
-
OBJECT
-
-
Field Details
-
clazz
-
typeId
public final int typeId -
VALUE_MAP
-
-
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
-
of
-
jdbcGet
Returns the value of a column of this type from a result set.- Throws:
SQLException
-
toProto
public org.apache.calcite.avatica.proto.Common.Rep toProto() -
fromProto
-
nonPrimitiveRepOf
Computes the given JDBC type for a primitive to the correspondingColumnMetaData.Repfor the equivalent Object type. If the provided type is not for a primitive, aColumnMetaData.Repfor the provided Object is returned.- Parameters:
type- The type of a value (based onTypes).- Returns:
- The corresponding non-primitive
ColumnMetaData.Repfor the giventype.
-
serialRepOf
Computes the given JDBC type into theColumnMetaData.Repfor the wire (serial) form of that type.- Parameters:
type- The type of a value (based onTypes).- Returns:
- The corresponding
ColumnMetaData.Repfor the serial form of thetype.
-