public final class SQLDataType extends Object
Types
.
These types are usually the ones that are referenced by generated source code. Most RDBMS have an almost 1:1 mapping between their vendor-specific types and the ones in this class (except Oracle). Some RDBMS also have extensions, e.g. for geospacial data types. See the dialect-specific data type classes for more information.
Modifier and Type | Method and Description |
---|---|
static DataType<byte[]> |
BINARY(int length)
The
Types.BINARY type. |
static DataType<byte[]> |
BLOB(int length)
The
Types.BLOB type. |
static DataType<String> |
CHAR(int length)
The
Types.CHAR type. |
static DataType<String> |
CLOB(int length)
The
Types.CLOB type. |
static DataType<BigDecimal> |
DECIMAL(int precision)
The
Types.DECIMAL type. |
static DataType<BigDecimal> |
DECIMAL(int precision,
int scale)
The
Types.DECIMAL type. |
static DataType<String> |
LONGNVARCHAR(int length)
The
Types.LONGNVARCHAR type. |
static DataType<byte[]> |
LONGVARBINARY(int length)
The
Types.LONGVARBINARY type. |
static DataType<String> |
LONGVARCHAR(int length)
The
Types.LONGVARCHAR type. |
static DataType<String> |
NCHAR(int length)
The
Types.NCHAR type. |
static DataType<String> |
NCLOB(int length)
The
Types.NCLOB type. |
static DataType<BigDecimal> |
NUMERIC(int precision)
The
Types.NUMERIC type. |
static DataType<BigDecimal> |
NUMERIC(int precision,
int scale)
The
Types.NUMERIC type. |
static DataType<String> |
NVARCHAR(int length)
The
Types.NVARCHAR type. |
static DataType<byte[]> |
VARBINARY(int length)
The
Types.VARBINARY type. |
static DataType<String> |
VARCHAR(int length)
The
Types.VARCHAR type. |
public static final DataType<String> VARCHAR
Types.VARCHAR
type.public static final DataType<String> CHAR
Types.CHAR
type.public static final DataType<String> LONGVARCHAR
Types.LONGVARCHAR
type.public static final DataType<String> CLOB
Types.CLOB
type.public static final DataType<String> NVARCHAR
Types.NVARCHAR
type.public static final DataType<String> NCHAR
Types.NCHAR
type.public static final DataType<String> LONGNVARCHAR
Types.LONGNVARCHAR
type.public static final DataType<String> NCLOB
Types.NCLOB
type.public static final DataType<Boolean> BOOLEAN
Types.BOOLEAN
type.public static final DataType<Byte> TINYINT
Types.TINYINT
type.public static final DataType<Short> SMALLINT
Types.SMALLINT
type.public static final DataType<Integer> INTEGER
Types.INTEGER
type.public static final DataType<Long> BIGINT
Types.BIGINT
type.public static final DataType<BigInteger> DECIMAL_INTEGER
Types.DECIMAL
type.public static final DataType<UByte> TINYINTUNSIGNED
Types.TINYINT
type.public static final DataType<UShort> SMALLINTUNSIGNED
Types.SMALLINT
type.public static final DataType<UInteger> INTEGERUNSIGNED
Types.INTEGER
type.public static final DataType<ULong> BIGINTUNSIGNED
Types.BIGINT
type.public static final DataType<Double> DOUBLE
Types.DOUBLE
type.public static final DataType<Double> FLOAT
Types.FLOAT
type.public static final DataType<Float> REAL
Types.REAL
type.public static final DataType<BigDecimal> NUMERIC
Types.NUMERIC
type.public static final DataType<BigDecimal> DECIMAL
Types.DECIMAL
type.public static final DataType<Date> DATE
Types.DATE
type.public static final DataType<Timestamp> TIMESTAMP
Types.TIMESTAMP
type.public static final DataType<Time> TIME
Types.TIME
type.public static final DataType<YearToMonth> INTERVALYEARTOMONTH
INTERVAL YEAR TO MONTH
data type.public static final DataType<DayToSecond> INTERVALDAYTOSECOND
INTERVAL DAY TO SECOND
data type.public static final DataType<java.time.LocalDate> LOCALDATE
Types.DATE
type.public static final DataType<java.time.LocalTime> LOCALTIME
Types.TIME
type.public static final DataType<java.time.LocalDateTime> LOCALDATETIME
Types.TIMESTAMP
type.public static final DataType<java.time.OffsetTime> OFFSETTIME
Types.TIME_WITH_TIMEZONE
type.
The behaviour of this data type is influenced by the JDBC driver and the
database that is used. Some databases support actual time zones (as in
ZonedDateTime
), other databases support only offsets (as in
OffsetDateTime
). Some databases retain the actual time zone
information that is stored and reproduce it with every fetch (e.g.
SQLDialect.ORACLE
), others use this type as a synonym for a
timestamp in UTC (e.g. SQLDialect.POSTGRES
), producing possibly a
value in the current time zone of the database or the client. Please
refer to your database for more information about the behaviour of this
data type.
public static final DataType<java.time.OffsetDateTime> OFFSETDATETIME
Types.TIMESTAMP_WITH_TIMEZONE
type.
The behaviour of this data type is influenced by the JDBC driver and the
database that is used. Some databases support actual time zones (as in
ZonedDateTime
), other databases support only offsets (as in
OffsetDateTime
). Some databases retain the actual time zone
information that is stored and reproduce it with every fetch (e.g.
SQLDialect.ORACLE
), others use this type as a synonym for a
timestamp in UTC (e.g. SQLDialect.POSTGRES
), producing possibly a
value in the current time zone of the database or the client. Please
refer to your database for more information about the behaviour of this
data type.
public static final DataType<java.time.OffsetTime> TIMEWITHTIMEZONE
Types.TIME_WITH_TIMEZONE
type.
An alias for OFFSETTIME
public static final DataType<java.time.OffsetDateTime> TIMESTAMPWITHTIMEZONE
Types.TIMESTAMP_WITH_TIMEZONE
type.
An alias for OFFSETDATETIME
public static final DataType<byte[]> BINARY
Types.BINARY
type.public static final DataType<byte[]> VARBINARY
Types.VARBINARY
type.public static final DataType<byte[]> LONGVARBINARY
Types.LONGVARBINARY
type.public static final DataType<byte[]> BLOB
Types.BLOB
type.public static final DataType<Object> OTHER
Types.OTHER
type.public static final DataType<Record> RECORD
Types.STRUCT
type.public static final DataType<Result<Record>> RESULT
ResultSet
type.
This is not a SQL or JDBC standard. This type emulates REF CURSOR types and similar constructs
public static final DataType<String> VARCHAR(int length)
Types.VARCHAR
type.public static final DataType<String> CHAR(int length)
Types.CHAR
type.public static final DataType<String> LONGVARCHAR(int length)
Types.LONGVARCHAR
type.public static final DataType<String> CLOB(int length)
Types.CLOB
type.public static final DataType<String> NVARCHAR(int length)
Types.NVARCHAR
type.public static final DataType<String> NCHAR(int length)
Types.NCHAR
type.public static final DataType<String> LONGNVARCHAR(int length)
Types.LONGNVARCHAR
type.public static final DataType<String> NCLOB(int length)
Types.NCLOB
type.public static final DataType<BigDecimal> NUMERIC(int precision)
Types.NUMERIC
type.public static final DataType<BigDecimal> NUMERIC(int precision, int scale)
Types.NUMERIC
type.public static final DataType<BigDecimal> DECIMAL(int precision)
Types.DECIMAL
type.public static final DataType<BigDecimal> DECIMAL(int precision, int scale)
Types.DECIMAL
type.public static final DataType<byte[]> BINARY(int length)
Types.BINARY
type.public static final DataType<byte[]> VARBINARY(int length)
Types.VARBINARY
type.public static final DataType<byte[]> LONGVARBINARY(int length)
Types.LONGVARBINARY
type.public static final DataType<byte[]> BLOB(int length)
Types.BLOB
type.Copyright © 2017. All Rights Reserved.