com.taosdata.jdbc.enums

## Enum DataType

- java.lang.Object
- - java.lang.Enum<DataType>
  - - com.taosdata.jdbc.enums.DataType

All Implemented Interfaces:
  Serializable, Comparable<DataType>

    public enum DataType
    extends Enum<DataType>

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`BIGINT`
`BINARY`
`BLOB`
`BOOL`
`DECIMAL128`
`DECIMAL64`
`DOUBLE`
`FLOAT`
`GEOMETRY`
`INT`
`JSON`
`NCHAR`
`NULL`
`SMALLINT`
`TIMESTAMP`
`TINYINT`
`UBIGINT`
`UINT`
`USMALLINT`
`UTINYINT`
`VARBINARY`
`VARCHAR`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static int` `calculateColumnSize(String typeName, String precisionType, int length)`
`static Integer` `calculateDecimalDigits(String typeName)`
`static DataType` `convertJDBC2DataType(int jdbcType)`
`static DataType` `convertTaosType2DataType(int taosType)`
`String` `getClassName()`
`static DataType` `getDataType(String name)`
`int` `getJdbcTypeValue()`
`int` `getSize()`
`int` `getTaosTypeValue()`
`String` `getTypeName()`
`static DataType` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static DataType[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### NULL

    public static final DataType NULL

#### BOOL

    public static final DataType BOOL

#### TINYINT

    public static final DataType TINYINT

#### UTINYINT

    public static final DataType UTINYINT

#### USMALLINT

    public static final DataType USMALLINT

#### SMALLINT

    public static final DataType SMALLINT

#### UINT

    public static final DataType UINT

#### INT

    public static final DataType INT

#### UBIGINT

    public static final DataType UBIGINT

#### BIGINT

    public static final DataType BIGINT

#### FLOAT

    public static final DataType FLOAT

#### DOUBLE

    public static final DataType DOUBLE

#### BINARY

    public static final DataType BINARY

#### VARCHAR

    public static final DataType VARCHAR

#### TIMESTAMP

    public static final DataType TIMESTAMP

#### NCHAR

    public static final DataType NCHAR

#### JSON

    public static final DataType JSON

#### VARBINARY

    public static final DataType VARBINARY

#### DECIMAL128

    public static final DataType DECIMAL128

#### GEOMETRY

    public static final DataType GEOMETRY

#### DECIMAL64

    public static final DataType DECIMAL64

#### BLOB

    public static final DataType BLOB

### Method Detail

#### values

    public static DataType[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (DataType c : DataType.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static DataType valueOf(String name)

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 name
  `NullPointerException` - if the argument is null

#### getTypeName

    public String getTypeName()

#### getClassName

    public String getClassName()

#### getTaosTypeValue

    public int getTaosTypeValue()

#### getJdbcTypeValue

    public int getJdbcTypeValue()

#### getSize

    public int getSize()

#### getDataType

    public static DataType getDataType(String name)

#### convertJDBC2DataType

    public static DataType convertJDBC2DataType(int jdbcType)
                                         throws SQLException

Throws:
  `SQLException`

#### convertTaosType2DataType

    public static DataType convertTaosType2DataType(int taosType)
                                             throws SQLException

Throws:
  `SQLException`

#### calculateColumnSize

    public static int calculateColumnSize(String typeName,
                                          String precisionType,
                                          int length)

#### calculateDecimalDigits

    public static Integer calculateDecimalDigits(String typeName)