public final class SQLDataType
extends java.lang.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 | Field and Description |
---|---|
static DataType<java.lang.Long> |
BIGINT
The
Types.BIGINT type. |
static DataType<ULong> |
BIGINTUNSIGNED
The unsigned
Types.BIGINT type. |
static DataType<byte[]> |
BINARY
The
Types.BINARY type. |
static DataType<java.lang.Boolean> |
BIT
The
Types.BIT type. |
static DataType<byte[]> |
BLOB
The
Types.BLOB type. |
static DataType<java.lang.Boolean> |
BOOLEAN
The
Types.BOOLEAN type. |
static DataType<java.lang.String> |
CHAR
The
Types.CHAR type. |
static DataType<java.lang.String> |
CLOB
The
Types.CLOB type. |
static DataType<java.sql.Date> |
DATE
The
Types.DATE type. |
static DataType<java.math.BigDecimal> |
DECIMAL
The
Types.DECIMAL type. |
static DataType<java.math.BigInteger> |
DECIMAL_INTEGER
The zero-scale
Types.DECIMAL type. |
static DataType<java.lang.Double> |
DOUBLE
The
Types.DOUBLE type. |
static DataType<java.lang.Double> |
FLOAT
The
Types.FLOAT type. |
static DataType<java.lang.Integer> |
INTEGER
The
Types.INTEGER type. |
static DataType<UInteger> |
INTEGERUNSIGNED
The unsigned
Types.INTEGER type. |
static DataType<DayToSecond> |
INTERVALDAYTOSECOND
The SQL standard
INTERVAL DAY TO SECOND data type. |
static DataType<YearToMonth> |
INTERVALYEARTOMONTH
The SQL standard
INTERVAL YEAR TO MONTH data type. |
static DataType<java.time.LocalDate> |
LOCALDATE
The
Types.DATE type. |
static DataType<java.time.LocalDateTime> |
LOCALDATETIME
The
Types.TIMESTAMP type. |
static DataType<java.time.LocalTime> |
LOCALTIME
The
Types.TIME type. |
static DataType<java.lang.String> |
LONGNVARCHAR
The
Types.LONGNVARCHAR type. |
static DataType<byte[]> |
LONGVARBINARY
The
Types.LONGVARBINARY type. |
static DataType<java.lang.String> |
LONGVARCHAR
The
Types.LONGVARCHAR type. |
static DataType<java.lang.String> |
NCHAR
The
Types.NCHAR type. |
static DataType<java.lang.String> |
NCLOB
The
Types.NCLOB type. |
static DataType<java.math.BigDecimal> |
NUMERIC
The
Types.NUMERIC type. |
static DataType<java.lang.String> |
NVARCHAR
The
Types.NVARCHAR type. |
static DataType<java.time.OffsetDateTime> |
OFFSETDATETIME
The
Types.TIMESTAMP_WITH_TIMEZONE type. |
static DataType<java.time.OffsetTime> |
OFFSETTIME
The
Types.TIME_WITH_TIMEZONE type. |
static DataType<java.lang.Object> |
OTHER
The
Types.OTHER type. |
static DataType<java.lang.Float> |
REAL
The
Types.REAL type. |
static DataType<Record> |
RECORD
The
Types.STRUCT type. |
static DataType<Result<Record>> |
RESULT
The
ResultSet type. |
static DataType<java.lang.Short> |
SMALLINT
The
Types.SMALLINT type. |
static DataType<UShort> |
SMALLINTUNSIGNED
The unsigned
Types.SMALLINT type. |
static DataType<java.sql.Time> |
TIME
The
Types.TIME type. |
static DataType<java.sql.Timestamp> |
TIMESTAMP
The
Types.TIMESTAMP type. |
static DataType<java.time.OffsetDateTime> |
TIMESTAMPWITHTIMEZONE
The
Types.TIMESTAMP_WITH_TIMEZONE type. |
static DataType<java.time.OffsetTime> |
TIMEWITHTIMEZONE
The
Types.TIME_WITH_TIMEZONE type. |
static DataType<java.lang.Byte> |
TINYINT
The
Types.TINYINT type. |
static DataType<UByte> |
TINYINTUNSIGNED
The unsigned
Types.TINYINT type. |
static DataType<java.util.UUID> |
UUID
The
UUID type. |
static DataType<byte[]> |
VARBINARY
The
Types.VARBINARY type. |
static DataType<java.lang.String> |
VARCHAR
The
Types.VARCHAR type. |
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<java.lang.String> |
CHAR(int length)
The
Types.CHAR type. |
static DataType<java.lang.String> |
CLOB(int length)
The
Types.CLOB type. |
static DataType<java.math.BigDecimal> |
DECIMAL(int precision)
The
Types.DECIMAL type. |
static DataType<java.math.BigDecimal> |
DECIMAL(int precision,
int scale)
The
Types.DECIMAL type. |
static DataType<java.lang.String> |
LONGNVARCHAR(int length)
The
Types.LONGNVARCHAR type. |
static DataType<byte[]> |
LONGVARBINARY(int length)
The
Types.LONGVARBINARY type. |
static DataType<java.lang.String> |
LONGVARCHAR(int length)
The
Types.LONGVARCHAR type. |
static DataType<java.lang.String> |
NCHAR(int length)
The
Types.NCHAR type. |
static DataType<java.lang.String> |
NCLOB(int length)
The
Types.NCLOB type. |
static DataType<java.math.BigDecimal> |
NUMERIC(int precision)
The
Types.NUMERIC type. |
static DataType<java.math.BigDecimal> |
NUMERIC(int precision,
int scale)
The
Types.NUMERIC type. |
static DataType<java.lang.String> |
NVARCHAR(int length)
The
Types.NVARCHAR type. |
static DataType<byte[]> |
VARBINARY(int length)
The
Types.VARBINARY type. |
static DataType<java.lang.String> |
VARCHAR(int length)
The
Types.VARCHAR type. |
public static final DataType<java.lang.String> VARCHAR
Types.VARCHAR
type.public static final DataType<java.lang.String> CHAR
Types.CHAR
type.public static final DataType<java.lang.String> LONGVARCHAR
Types.LONGVARCHAR
type.public static final DataType<java.lang.String> CLOB
Types.CLOB
type.public static final DataType<java.lang.String> NVARCHAR
Types.NVARCHAR
type.public static final DataType<java.lang.String> NCHAR
Types.NCHAR
type.public static final DataType<java.lang.String> LONGNVARCHAR
Types.LONGNVARCHAR
type.public static final DataType<java.lang.String> NCLOB
Types.NCLOB
type.public static final DataType<java.lang.Boolean> BOOLEAN
Types.BOOLEAN
type.public static final DataType<java.lang.Boolean> BIT
Types.BIT
type.public static final DataType<java.lang.Byte> TINYINT
Types.TINYINT
type.public static final DataType<java.lang.Short> SMALLINT
Types.SMALLINT
type.public static final DataType<java.lang.Integer> INTEGER
Types.INTEGER
type.public static final DataType<java.lang.Long> BIGINT
Types.BIGINT
type.public static final DataType<java.math.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<java.lang.Double> DOUBLE
Types.DOUBLE
type.public static final DataType<java.lang.Double> FLOAT
Types.FLOAT
type.public static final DataType<java.lang.Float> REAL
Types.REAL
type.public static final DataType<java.math.BigDecimal> NUMERIC
Types.NUMERIC
type.public static final DataType<java.math.BigDecimal> DECIMAL
Types.DECIMAL
type.public static final DataType<java.sql.Date> DATE
Types.DATE
type.public static final DataType<java.sql.Timestamp> TIMESTAMP
Types.TIMESTAMP
type.public static final DataType<java.sql.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<java.lang.Object> OTHER
Types.OTHER
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<java.util.UUID> UUID
UUID
type.
This is not a SQL or JDBC standard. This type handles UUID types where they are supported
public static final DataType<java.lang.String> VARCHAR(int length)
Types.VARCHAR
type.public static final DataType<java.lang.String> CHAR(int length)
Types.CHAR
type.public static final DataType<java.lang.String> LONGVARCHAR(int length)
Types.LONGVARCHAR
type.public static final DataType<java.lang.String> CLOB(int length)
Types.CLOB
type.public static final DataType<java.lang.String> NVARCHAR(int length)
Types.NVARCHAR
type.public static final DataType<java.lang.String> NCHAR(int length)
Types.NCHAR
type.public static final DataType<java.lang.String> LONGNVARCHAR(int length)
Types.LONGNVARCHAR
type.public static final DataType<java.lang.String> NCLOB(int length)
Types.NCLOB
type.public static final DataType<java.math.BigDecimal> NUMERIC(int precision)
Types.NUMERIC
type.public static final DataType<java.math.BigDecimal> NUMERIC(int precision, int scale)
Types.NUMERIC
type.public static final DataType<java.math.BigDecimal> DECIMAL(int precision)
Types.DECIMAL
type.public static final DataType<java.math.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 © 2018. All Rights Reserved.