public abstract class DataTypeUtilities
extends java.lang.Object
Constructor | Description |
---|---|
DataTypeUtilities() |
Modifier and Type | Method | Description |
---|---|---|
static java.sql.Timestamp |
clone(java.sql.Timestamp original) |
Clone a Timestamp because they are mutable
|
static int |
computeMaxWidth(int precision,
int scale) |
Compute the maximum width (column display width) of a decimal or numeric data value,
given its precision and scale.
|
static int |
getColumnDisplaySize(int typeId,
int storageLength) |
|
static int |
getColumnDisplaySize(DataTypeDescriptor dtd) |
Gets the display width of a column of a given type.
|
static int |
getDigitPrecision(DataTypeDescriptor dtd) |
Get the precision of the datatype, in decimal digits
This is used by EmbedResultSetMetaData.
|
static int |
getPrecision(DataTypeDescriptor dtd) |
Get the precision of the datatype.
|
static boolean |
isCaseSensitive(DataTypeDescriptor dtd) |
Is the data type case sensitive.
|
static int |
isNullable(DataTypeDescriptor dtd) |
Is the data type nullable.
|
static boolean |
isSigned(DataTypeDescriptor dtd) |
Is the data type signed.
|
public static java.sql.Timestamp clone(java.sql.Timestamp original)
public static int getPrecision(DataTypeDescriptor dtd)
dtd
- data type descriptorpublic static int getDigitPrecision(DataTypeDescriptor dtd)
dtd
- data type descriptorpublic static boolean isCaseSensitive(DataTypeDescriptor dtd)
dtd
- data type descriptorpublic static int isNullable(DataTypeDescriptor dtd)
dtd
- data type descriptorpublic static boolean isSigned(DataTypeDescriptor dtd)
dtd
- data type descriptorpublic static int getColumnDisplaySize(DataTypeDescriptor dtd)
dtd
- data type descriptorpublic static int getColumnDisplaySize(int typeId, int storageLength)
public static int computeMaxWidth(int precision, int scale)
precision
- The precision (number of digits) of the data value.scale
- The number of fractional digits (digits to the right of the decimal point).Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.