public class TypeInfo extends ExtTypeInfo implements Typed
| Modifier and Type | Field and Description |
|---|---|
static TypeInfo |
TYPE_ARRAY_UNKNOWN
ARRAY type with unknown parameters.
|
static TypeInfo |
TYPE_BIGINT
BIGINT type with parameters.
|
static TypeInfo |
TYPE_BINARY
BINARY type with default parameters.
|
static TypeInfo |
TYPE_BLOB
BINARY LARGE OBJECT type with maximum parameters.
|
static TypeInfo |
TYPE_BOOLEAN
BOOLEAN type with parameters.
|
static TypeInfo |
TYPE_CHAR
CHAR type with default parameters.
|
static TypeInfo |
TYPE_CLOB
CHARACTER LARGE OBJECT type with maximum parameters.
|
static TypeInfo |
TYPE_DATE
DATE type with parameters.
|
static TypeInfo |
TYPE_DECFLOAT
DECFLOAT type with maximum parameters.
|
static TypeInfo |
TYPE_DECFLOAT_BIGINT
DECFLOAT type with parameters enough to hold a BIGINT value.
|
static TypeInfo |
TYPE_DOUBLE
DOUBLE PRECISION type with parameters.
|
static TypeInfo |
TYPE_ENUM_UNDEFINED
ENUM type with undefined parameters.
|
static TypeInfo |
TYPE_GEOMETRY
GEOMETRY type with default parameters.
|
static TypeInfo |
TYPE_INTEGER
INTEGER type with parameters.
|
static TypeInfo |
TYPE_INTERVAL_DAY
INTERVAL DAY type with maximum parameters.
|
static TypeInfo |
TYPE_INTERVAL_DAY_TO_SECOND
INTERVAL DAY TO SECOND type with maximum parameters.
|
static TypeInfo |
TYPE_INTERVAL_HOUR_TO_SECOND
INTERVAL HOUR TO SECOND type with maximum parameters.
|
static TypeInfo |
TYPE_INTERVAL_YEAR_TO_MONTH
INTERVAL YEAR TO MONTH type with maximum parameters.
|
static TypeInfo |
TYPE_JAVA_OBJECT
JAVA_OBJECT type with maximum parameters.
|
static TypeInfo |
TYPE_JSON
JSON type.
|
static TypeInfo |
TYPE_NULL
NULL type with parameters.
|
static TypeInfo |
TYPE_NUMERIC_BIGINT
NUMERIC type with parameters enough to hold a BIGINT value.
|
static TypeInfo |
TYPE_NUMERIC_FLOATING_POINT
NUMERIC type that can hold values with floating point.
|
static TypeInfo |
TYPE_NUMERIC_SCALE_0
NUMERIC type with maximum precision and scale 0.
|
static TypeInfo |
TYPE_REAL
REAL type with parameters.
|
static TypeInfo |
TYPE_ROW_EMPTY
ROW (row value) type without fields.
|
static TypeInfo |
TYPE_SMALLINT
SMALLINT type with parameters.
|
static TypeInfo |
TYPE_TIME
TIME type with maximum parameters.
|
static TypeInfo |
TYPE_TIME_TZ
TIME WITH TIME ZONE type with maximum parameters.
|
static TypeInfo |
TYPE_TIMESTAMP
TIMESTAMP type with maximum parameters.
|
static TypeInfo |
TYPE_TIMESTAMP_TZ
TIMESTAMP WITH TIME ZONE type with maximum parameters.
|
static TypeInfo |
TYPE_TINYINT
TINYINT type with parameters.
|
static TypeInfo |
TYPE_UNKNOWN
UNKNOWN type with parameters.
|
static TypeInfo |
TYPE_UUID
UUID type with parameters.
|
static TypeInfo |
TYPE_VARBINARY
BINARY VARYING type with maximum parameters.
|
static TypeInfo |
TYPE_VARCHAR
CHARACTER VARYING type with maximum parameters.
|
static TypeInfo |
TYPE_VARCHAR_IGNORECASE
VARCHAR_IGNORECASE type with maximum parameters.
|
ADD_PLAN_INFORMATION, DEFAULT_SQL_FLAGS, NO_CASTS, QUOTE_ONLY_WHEN_REQUIRED, REPLACE_LOBS_FOR_TRACE, TRACE_SQL_FLAGS| Constructor and Description |
|---|
TypeInfo(int valueType,
long precision,
int scale,
ExtTypeInfo extTypeInfo)
Creates new instance of data type with parameters.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
areSameTypes(TypeInfo t1,
TypeInfo t2)
Determines whether two specified types are the same data types without
taking precision or scale into account.
|
static void |
checkComparable(TypeInfo t1,
TypeInfo t2)
Checks whether two specified types are comparable and throws an exception
otherwise.
|
boolean |
equals(java.lang.Object obj) |
long |
getDecimalPrecision()
Returns approximate precision in decimal digits for binary numeric data
types and precision for all other types.
|
long |
getDeclaredPrecision()
Returns the precision, or
-1L if not specified in data type
definition. |
int |
getDeclaredScale()
Returns the scale, or
-1 if not specified in data type
definition. |
java.lang.String |
getDeclaredTypeName()
Returns the declared name of this data type with precision, scale,
length, cardinality etc.
|
int |
getDisplaySize()
Returns the display size in characters.
|
ExtTypeInfo |
getExtTypeInfo()
Returns the extended type information, or null.
|
static TypeInfo |
getHigherType(Typed[] values)
Get the higher data type of all values.
|
static TypeInfo |
getHigherType(TypeInfo type1,
TypeInfo type2)
Get the higher data type of two data types.
|
long |
getPrecision()
Returns the precision.
|
int |
getScale()
Returns the scale.
|
java.lang.StringBuilder |
getSQL(java.lang.StringBuilder builder,
int sqlFlags)
Appends the SQL statement of this object to the specified builder.
|
TypeInfo |
getType()
Returns this type information.
|
static TypeInfo |
getTypeInfo(int type)
Get the data type with parameters object for the given value type and
maximum parameters.
|
static TypeInfo |
getTypeInfo(int type,
long precision,
int scale,
ExtTypeInfo extTypeInfo)
Get the data type with parameters object for the given value type and the
specified parameters.
|
int |
getValueType()
Returns the value type.
|
int |
hashCode() |
static boolean |
haveSameOrdering(TypeInfo t1,
TypeInfo t2)
Determines whether two specified types have the same ordering rules.
|
TypeInfo |
toDecfloatType()
Convert this type information to compatible DECFLOAT type information.
|
TypeInfo |
toNumericType()
Convert this type information to compatible NUMERIC type information.
|
TypeInfo |
unwrapRow()
Returns unwrapped data type if this data type is a row type with degree 1
or this type otherwise.
|
toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSQL, getTraceSQLpublic static final TypeInfo TYPE_UNKNOWN
public static final TypeInfo TYPE_NULL
public static final TypeInfo TYPE_CHAR
public static final TypeInfo TYPE_VARCHAR
public static final TypeInfo TYPE_VARCHAR_IGNORECASE
public static final TypeInfo TYPE_CLOB
public static final TypeInfo TYPE_BINARY
public static final TypeInfo TYPE_VARBINARY
public static final TypeInfo TYPE_BLOB
public static final TypeInfo TYPE_BOOLEAN
public static final TypeInfo TYPE_TINYINT
public static final TypeInfo TYPE_SMALLINT
public static final TypeInfo TYPE_INTEGER
public static final TypeInfo TYPE_BIGINT
public static final TypeInfo TYPE_NUMERIC_SCALE_0
public static final TypeInfo TYPE_NUMERIC_BIGINT
public static final TypeInfo TYPE_NUMERIC_FLOATING_POINT
public static final TypeInfo TYPE_REAL
public static final TypeInfo TYPE_DOUBLE
public static final TypeInfo TYPE_DECFLOAT
public static final TypeInfo TYPE_DECFLOAT_BIGINT
public static final TypeInfo TYPE_DATE
public static final TypeInfo TYPE_TIME
public static final TypeInfo TYPE_TIME_TZ
public static final TypeInfo TYPE_TIMESTAMP
public static final TypeInfo TYPE_TIMESTAMP_TZ
public static final TypeInfo TYPE_INTERVAL_DAY
public static final TypeInfo TYPE_INTERVAL_YEAR_TO_MONTH
public static final TypeInfo TYPE_INTERVAL_DAY_TO_SECOND
public static final TypeInfo TYPE_INTERVAL_HOUR_TO_SECOND
public static final TypeInfo TYPE_JAVA_OBJECT
public static final TypeInfo TYPE_ENUM_UNDEFINED
public static final TypeInfo TYPE_GEOMETRY
public static final TypeInfo TYPE_JSON
public static final TypeInfo TYPE_UUID
public static final TypeInfo TYPE_ARRAY_UNKNOWN
public static final TypeInfo TYPE_ROW_EMPTY
public TypeInfo(int valueType,
long precision,
int scale,
ExtTypeInfo extTypeInfo)
valueType - the value typeprecision - the precisionscale - the scaleextTypeInfo - the extended type information, or nullpublic static TypeInfo getTypeInfo(int type)
type - the value typepublic static TypeInfo getTypeInfo(int type, long precision, int scale, ExtTypeInfo extTypeInfo)
type - the value typeprecision - the precision or -1L for defaultscale - the scale or -1 for defaultextTypeInfo - the extended type information or nullpublic static TypeInfo getHigherType(Typed[] values)
values - the valuespublic static TypeInfo getHigherType(TypeInfo type1, TypeInfo type2)
type1 - the first data typetype2 - the second data typepublic static boolean areSameTypes(TypeInfo t1, TypeInfo t2)
t1 - first data typet2 - second data typepublic static void checkComparable(TypeInfo t1, TypeInfo t2)
t1 - first data typet2 - second data typeDbException - if types aren't comparablepublic static boolean haveSameOrdering(TypeInfo t1, TypeInfo t2)
t1 - first data typet2 - second data typepublic TypeInfo getType()
public int getValueType()
public long getPrecision()
public long getDeclaredPrecision()
-1L if not specified in data type
definition.-1L if not specified in data type
definitionpublic int getScale()
public int getDeclaredScale()
-1 if not specified in data type
definition.-1 if not specified in data type definitionpublic int getDisplaySize()
public ExtTypeInfo getExtTypeInfo()
public java.lang.StringBuilder getSQL(java.lang.StringBuilder builder,
int sqlFlags)
HasSQLpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic TypeInfo toNumericType()
public TypeInfo toDecfloatType()
public TypeInfo unwrapRow()
public long getDecimalPrecision()
public java.lang.String getDeclaredTypeName()