org.h2.value

## Class TypeInfo

- java.lang.Object
- - org.h2.value.TypeInfo

    public class TypeInfo
    extends java.lang.Object

Data type with parameters.

### Field Summary

Fields
`static TypeInfo` `TYPE_ARRAY` ARRAY type with parameters.
`static TypeInfo` `TYPE_BOOLEAN` BOOLEAN type with parameters.
`static TypeInfo` `TYPE_BYTE` BYTE type with parameters.
`static TypeInfo` `TYPE_DATE` DATE type with parameters.
`static TypeInfo` `TYPE_DECIMAL` DECIMAL type with maximum parameters.
`static TypeInfo` `TYPE_DECIMAL_DEFAULT` DECIMAL type with default parameters.
`static TypeInfo` `TYPE_DOUBLE` DOUBLE type with parameters.
`static TypeInfo` `TYPE_ENUM_UNDEFINED` ENUM type with undefined parameters.
`static TypeInfo` `TYPE_FLOAT` FLOAT type with parameters.
`static TypeInfo` `TYPE_GEOMETRY` GEOMETRY type with default parameters.
`static TypeInfo` `TYPE_INT` INT 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_JAVA_OBJECT` JAVA_OBJECT type with parameters.
`static TypeInfo` `TYPE_LONG` LONG type with parameters.
`static TypeInfo` `TYPE_NULL` NULL type with parameters.
`static TypeInfo` `TYPE_RESULT_SET` RESULT_SET type with parameters.
`static TypeInfo` `TYPE_ROW` ROW (row value) type with parameters.
`static TypeInfo` `TYPE_SHORT` SHORT type with parameters.
`static TypeInfo` `TYPE_STRING` STRING type with maximum parameters.
`static TypeInfo` `TYPE_TIME` TIME 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_UNKNOWN` UNKNOWN type with parameters.
`static TypeInfo` `TYPE_UUID` UUID type with parameters.

### Constructor Summary

Constructors
Constructor and Description
`TypeInfo(int valueType, long precision, int scale, int displaySize, ExtTypeInfo extTypeInfo)` Creates new instance of data type with parameters.

### Method Summary

Methods
`int` `getDisplaySize()` Returns the display size in characters.
`ExtTypeInfo` `getExtTypeInfo()` Returns the extended type information, or null.
`long` `getPrecision()` Returns the precision.
`int` `getScale()` Returns the scale.
`java.lang.StringBuilder` `getSQL(java.lang.StringBuilder builder)` Appends SQL representation of this object to the specified string builder.
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### TYPE_UNKNOWN

    public static final TypeInfo TYPE_UNKNOWN

UNKNOWN type with parameters.

#### TYPE_NULL

    public static final TypeInfo TYPE_NULL

NULL type with parameters.

#### TYPE_BOOLEAN

    public static final TypeInfo TYPE_BOOLEAN

BOOLEAN type with parameters.

#### TYPE_BYTE

    public static final TypeInfo TYPE_BYTE

BYTE type with parameters.

#### TYPE_SHORT

    public static final TypeInfo TYPE_SHORT

SHORT type with parameters.

#### TYPE_INT

    public static final TypeInfo TYPE_INT

INT type with parameters.

#### TYPE_LONG

    public static final TypeInfo TYPE_LONG

LONG type with parameters.

#### TYPE_DECIMAL

    public static final TypeInfo TYPE_DECIMAL

DECIMAL type with maximum parameters.

#### TYPE_DECIMAL_DEFAULT

    public static final TypeInfo TYPE_DECIMAL_DEFAULT

DECIMAL type with default parameters.

#### TYPE_DOUBLE

    public static final TypeInfo TYPE_DOUBLE

DOUBLE type with parameters.

#### TYPE_FLOAT

    public static final TypeInfo TYPE_FLOAT

FLOAT type with parameters.

#### TYPE_TIME

    public static final TypeInfo TYPE_TIME

TIME type with maximum parameters.

#### TYPE_DATE

    public static final TypeInfo TYPE_DATE

DATE type with parameters.

#### TYPE_TIMESTAMP

    public static final TypeInfo TYPE_TIMESTAMP

TIMESTAMP type with maximum parameters.

#### TYPE_STRING

    public static final TypeInfo TYPE_STRING

STRING type with maximum parameters.

#### TYPE_ARRAY

    public static final TypeInfo TYPE_ARRAY

ARRAY type with parameters.

#### TYPE_RESULT_SET

    public static final TypeInfo TYPE_RESULT_SET

RESULT_SET type with parameters.

#### TYPE_JAVA_OBJECT

    public static final TypeInfo TYPE_JAVA_OBJECT

JAVA_OBJECT type with parameters.

#### TYPE_UUID

    public static final TypeInfo TYPE_UUID

UUID type with parameters.

#### TYPE_GEOMETRY

    public static final TypeInfo TYPE_GEOMETRY

GEOMETRY type with default parameters.

#### TYPE_TIMESTAMP_TZ

    public static final TypeInfo TYPE_TIMESTAMP_TZ

TIMESTAMP WITH TIME ZONE type with maximum parameters.

#### TYPE_ENUM_UNDEFINED

    public static final TypeInfo TYPE_ENUM_UNDEFINED

ENUM type with undefined parameters.

#### TYPE_INTERVAL_DAY

    public static final TypeInfo TYPE_INTERVAL_DAY

INTERVAL DAY type with maximum parameters.

#### TYPE_INTERVAL_DAY_TO_SECOND

    public static final TypeInfo TYPE_INTERVAL_DAY_TO_SECOND

INTERVAL DAY TO SECOND type with maximum parameters.

#### TYPE_INTERVAL_HOUR_TO_SECOND

    public static final TypeInfo TYPE_INTERVAL_HOUR_TO_SECOND

INTERVAL HOUR TO SECOND type with maximum parameters.

#### TYPE_ROW

    public static final TypeInfo TYPE_ROW

ROW (row value) type with parameters.

### Constructor Detail

#### TypeInfo

    public TypeInfo(int valueType,
            long precision,
            int scale,
            int displaySize,
            ExtTypeInfo extTypeInfo)

Creates new instance of data type with parameters.

Parameters:
  `valueType` - the value type
  `precision` - the precision
  `scale` - the scale
  `displaySize` - the display size in characters
  `extTypeInfo` - the extended type information, or null

### Method Detail

#### getTypeInfo

    public static TypeInfo getTypeInfo(int type)

Get the data type with parameters object for the given value type and maximum parameters.

Parameters:
  `type` - the value type
Returns:
  the data type with parameters object

#### getTypeInfo

    public 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.

Parameters:
  `type` - the value type
  `precision` - the precision
  `scale` - the scale
  `extTypeInfo` - the extended type information, or null
Returns:
  the data type with parameters object

#### getValueType

    public int getValueType()

Returns the value type.

Returns:
  the value type

#### getPrecision

    public long getPrecision()

Returns the precision.

Returns:
  the precision

#### getScale

    public int getScale()

Returns the scale.

Returns:
  the scale

#### getDisplaySize

    public int getDisplaySize()

Returns the display size in characters.

Returns:
  the display size

#### getExtTypeInfo

    public ExtTypeInfo getExtTypeInfo()

Returns the extended type information, or null.

Returns:
  the extended type information, or null

#### getSQL

    public java.lang.StringBuilder getSQL(java.lang.StringBuilder builder)

Appends SQL representation of this object to the specified string builder.

Parameters:
  `builder` - string builder
Returns:
  the specified string builder