| Modifier and Type | Field and Description |
|---|---|
| public boolean | caseSensitive
If this data type is case sensitive. |
| public long | defaultPrecision
The default precision. |
| public int | defaultScale
The default scale. |
| public long | maxPrecision
The maximum supported precision. |
| public int | maxScale
The highest possible scale. |
| public long | minPrecision
The minimum supported precision. |
| public int | minScale
The lowest possible scale. |
| public String | params
The list of parameters used in the column definition. |
| public String | prefix
The prefix required for the SQL literal representation. |
| public boolean | specialPrecisionScale
If precision and scale have non-standard default values. |
| public int | sqlType
The SQL type. |
| public String | suffix
The suffix required for the SQL literal representation. |
| public boolean | supportsPrecision
If the precision parameter is supported. |
| public boolean | supportsScale
If the scale parameter is supported. |
| public int | type
The value type of this data type. |
| private static final HashMap | TYPES_BY_NAME
The map of types. |
| pack-priv static final DataType[] | TYPES_BY_VALUE_TYPE
Mapping from Value type numbers to DataType. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | |
| private static void | |
| public static long | Returns: the sum of summands, orLong#MAX_VALUE if either argument
is negative or sum is out of rangethe first summand p1, long the second summand p2)Performs saturated addition of precision values. |
| public static boolean | Returns: are values have session-independent compare resultsthe first data type type1, TypeInfo the second data type type2)Returns whether values of the specified data types have session-independent compare results. |
| public static int | Returns: the value typethe SQL type sqlType, String the SQL type name sqlTypeName)Convert a SQL type to a value type using SQL type name, in order to manage SQL type extension mechanism. |
| public static int | Returns: the value typethe SQL type sqlType)Convert a SQL type to a value type. |
| public static int | Returns: the value typethe SQL type sqlType)Convert a SQL type to a value type. |
| public static int | |
| private static DataType | |
| public static DataType | Returns: data typemaximum supported precision maxPrecision, int default precision precision, String the prefix for SQL literal representation prefix, boolean whether the scale parameter is supported supportsScale, int default scale scale, int highest possible scale maxScale)Create a date-time data type. |
| private static DataType | |
| private static DataType | |
| public static DataType | Returns: data typeprecision precision, int scale scale)Create a numeric data type without parameters. |
| private static DataType | |
| private static DataType | |
| public static DataType | Returns: the data type objectthe value type type)Get the data type object for the given value type. |
| public static Object | Returns: the default objectthe Java class clazz)Get the default value in the form of a Java object for the given Java class. |
| public static DataType | Returns: the data type objectthe type name s, Mode database mode mode)Get a data type object from a type name. |
| public static int | Returns: the value typethe meta data meta, int the column index (1, 2,...) columnIndex)Get the SQL type from the result set meta data for the given column. |
| public static boolean | Returns: true if the value type has total orderingthe value type type)Check if the given type has total ordering. |
| public static boolean | Returns: true if column needs the binary representation,
false otherwisemetadata meta, int column index column)Check whether the specified column needs the binary representation. |
| public static boolean | Returns: true if the value type is a binary string type or a compatible special data typethe value type type)Check if the given value type is a binary string type or a compatible special data type such as Java object, UUID, geometry object, or JSON. |
| public static boolean | Returns: true if the value type is a binary string typethe value type type)Check if the given value type is a binary string type. |
| public static boolean | Returns: true if the value type is a character string typethe value type type)Check if the given value type is a character string type. |
| public static boolean | Returns: true if the value type is a date-time typethe value type type)Check if the given value type is a date-time type (TIME, DATE, TIMESTAMP, TIMESTAMP_TZ). |
| public static boolean | Returns: whether an index is allowedthe data type type)Returns whether columns with the specified data type may have an index. |
| public static boolean | Returns: true if the value type is an interval typethe value type type)Check if the given value type is an interval type. |
| public static boolean | Returns: true if the value type is a lob typethe value type type)Check if the given value type is a large object (BLOB or CLOB). |
| public static boolean | Returns: true if the value type is a numeric typethe value type type)Check if the given value type is a numeric type. |
| public static boolean | Returns: true if the value type is a String typethe value type type)Check if the given value type is a String (VARCHAR,...). |
| public static boolean | Returns: true if the value type is a year-month interval typethe value type type)Check if the given value type is a year-month interval type. |
| public static String | Returns: the textual representationthe SQL type sqlType)Convert a SQL type to a debug string. |
| private static StringBuilder |
| caseSensitive | back to summary |
|---|---|
| public boolean caseSensitive If this data type is case sensitive. | |
| defaultPrecision | back to summary |
|---|---|
| public long defaultPrecision The default precision. | |
| defaultScale | back to summary |
|---|---|
| public int defaultScale The default scale. | |
| maxPrecision | back to summary |
|---|---|
| public long maxPrecision The maximum supported precision. | |
| maxScale | back to summary |
|---|---|
| public int maxScale The highest possible scale. | |
| minPrecision | back to summary |
|---|---|
| public long minPrecision The minimum supported precision. | |
| minScale | back to summary |
|---|---|
| public int minScale The lowest possible scale. | |
| params | back to summary |
|---|---|
| public String params The list of parameters used in the column definition. | |
| prefix | back to summary |
|---|---|
| public String prefix The prefix required for the SQL literal representation. | |
| specialPrecisionScale | back to summary |
|---|---|
| public boolean specialPrecisionScale If precision and scale have non-standard default values. | |
| sqlType | back to summary |
|---|---|
| public int sqlType The SQL type. | |
| suffix | back to summary |
|---|---|
| public String suffix The suffix required for the SQL literal representation. | |
| supportsPrecision | back to summary |
|---|---|
| public boolean supportsPrecision If the precision parameter is supported. | |
| supportsScale | back to summary |
|---|---|
| public boolean supportsScale If the scale parameter is supported. | |
| type | back to summary |
|---|---|
| public int type The value type of this data type. | |
| TYPES_BY_NAME | back to summary |
|---|---|
| private static final HashMap<String, DataType> TYPES_BY_NAME The map of types. | |
| TYPES_BY_VALUE_TYPE | back to summary |
|---|---|
| pack-priv static final DataType[] TYPES_BY_VALUE_TYPE Mapping from Value type numbers to DataType. | |
| DataType | back to summary |
|---|---|
| public DataType() | |
| add | back to summary |
|---|---|
| private static void add(int type, int sqlType, DataType dataType, String... names) | |
| addInterval | back to summary |
|---|---|
| private static void addInterval(int type) | |
| addPrecision | back to summary |
|---|---|
| public static long addPrecision(long p1, long p2) Performs saturated addition of precision values.
| |
| areStableComparable | back to summary |
|---|---|
| public static boolean areStableComparable(TypeInfo type1, TypeInfo type2) Returns whether values of the specified data types have session-independent compare results. | |
| convertSQLTypeToValueType | back to summary |
|---|---|
| public static int convertSQLTypeToValueType(int sqlType, String sqlTypeName) Convert a SQL type to a value type using SQL type name, in order to manage SQL type extension mechanism.
| |
| convertSQLTypeToValueType | back to summary |
|---|---|
| public static int convertSQLTypeToValueType(SQLType sqlType) Convert a SQL type to a value type.
| |
| convertSQLTypeToValueType | back to summary |
|---|---|
| public static int convertSQLTypeToValueType(int sqlType) Convert a SQL type to a value type.
| |
| convertTypeToSQLType | back to summary |
|---|---|
| public static int convertTypeToSQLType(TypeInfo type) Convert a value type to a SQL type.
| |
| createBinary | back to summary |
|---|---|
| private static DataType createBinary(boolean fixedLength) | |
| createDate | back to summary |
|---|---|
| public static DataType createDate(int maxPrecision, int precision, String prefix, boolean supportsScale, int scale, int maxScale) Create a date-time data type. | |
| createGeometry | back to summary |
|---|---|
| private static DataType createGeometry() | |
| createLob | back to summary |
|---|---|
| private static DataType createLob(boolean clob) | |
| createNumeric | back to summary |
|---|---|
| public static DataType createNumeric(int precision, int scale) Create a numeric data type without parameters.
| |
| createString | back to summary |
|---|---|
| private static DataType createString(boolean caseSensitive, boolean fixedLength) | |
| createString | back to summary |
|---|---|
| private static DataType createString(boolean caseSensitive, boolean fixedLength, String prefix, String suffix) | |
| getDataType | back to summary |
|---|---|
| public static DataType getDataType(int type) Get the data type object for the given value type.
| |
| getDefaultForPrimitiveType | back to summary |
|---|---|
| public static Object getDefaultForPrimitiveType(Class<?> clazz) Get the default value in the form of a Java object for the given Java class. | |
| getTypeByName | back to summary |
|---|---|
| public static DataType getTypeByName(String s, Mode mode) Get a data type object from a type name. | |
| getValueTypeFromResultSet | back to summary |
|---|---|
| public static int getValueTypeFromResultSet(ResultSetMetaData meta, int columnIndex) throws SQLException Get the SQL type from the result set meta data for the given column. This method uses the SQL type and type name.
| |
| hasTotalOrdering | back to summary |
|---|---|
| public static boolean hasTotalOrdering(int type) Check if the given type has total ordering.
| |
| isBinaryColumn | back to summary |
|---|---|
| public static boolean isBinaryColumn(ResultSetMetaData meta, int column) throws SQLException Check whether the specified column needs the binary representation.
| |
| isBinaryStringOrSpecialBinaryType | back to summary |
|---|---|
| public static boolean isBinaryStringOrSpecialBinaryType(int type) Check if the given value type is a binary string type or a compatible special data type such as Java object, UUID, geometry object, or JSON.
| |
| isBinaryStringType | back to summary |
|---|---|
| public static boolean isBinaryStringType(int type) Check if the given value type is a binary string type.
| |
| isCharacterStringType | back to summary |
|---|---|
| public static boolean isCharacterStringType(int type) Check if the given value type is a character string type.
| |
| isDateTimeType | back to summary |
|---|---|
| public static boolean isDateTimeType(int type) Check if the given value type is a date-time type (TIME, DATE, TIMESTAMP, TIMESTAMP_TZ).
| |
| isIndexable | back to summary |
|---|---|
| public static boolean isIndexable(TypeInfo type) Returns whether columns with the specified data type may have an index.
| |
| isIntervalType | back to summary |
|---|---|
| public static boolean isIntervalType(int type) Check if the given value type is an interval type.
| |
| isLargeObject | back to summary |
|---|---|
| public static boolean isLargeObject(int type) Check if the given value type is a large object (BLOB or CLOB).
| |
| isNumericType | back to summary |
|---|---|
| public static boolean isNumericType(int type) Check if the given value type is a numeric type.
| |
| isStringType | back to summary |
|---|---|
| public static boolean isStringType(int type) Check if the given value type is a String (VARCHAR,...).
| |
| isYearMonthIntervalType | back to summary |
|---|---|
| public static boolean isYearMonthIntervalType(int type) Check if the given value type is a year-month interval type.
| |
| sqlTypeToString | back to summary |
|---|---|
| public static String sqlTypeToString(SQLType sqlType) Convert a SQL type to a debug string. | |
| unknownSqlTypeToString | back to summary |
|---|---|
| private static StringBuilder unknownSqlTypeToString(StringBuilder builder, SQLType sqlType) | |