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.
- Author:
- Lukas Eder
-
Field Summary
Modifier and TypeFieldDescriptionTheTypes.BIGINT
type.The unsignedTypes.BIGINT
type.static final DataType
<byte[]> TheTypes.BINARY
type.TheTypes.BIT
type.static final DataType
<byte[]> TheTypes.BLOB
type.TheTypes.BOOLEAN
type.TheTypes.CHAR
type.TheTypes.CLOB
type.TheTypes.DATE
type.TheDecfloat
type.static final DataType
<BigDecimal> TheTypes.DECIMAL
type.static final DataType
<BigInteger> The zero-scaleTypes.DECIMAL
type.TheTypes.DOUBLE
type.TheTypes.FLOAT
type.TheGeography
type.TheGeometry
type.ATypes.TIMESTAMP_WITH_TIMEZONE
type that uses UTC as time zone.TheTypes.INTEGER
type.The unsignedTypes.INTEGER
type.static final DataType
<YearToSecond> A vendor specificINTERVAL YEAR TO SECOND
data type, which combinesINTERVALYEARTOMONTH
andINTERVALDAYTOSECOND
.static final DataType
<DayToSecond> The SQL standardINTERVAL DAY TO SECOND
data type.static final DataType
<YearToMonth> The SQL standardINTERVAL YEAR TO MONTH
data type.TheJSON
type.TheJSONB
type.TheTypes.DATE
type.static final DataType
<LocalDateTime> TheTypes.TIMESTAMP
type.TheTypes.TIME
type.TheTypes.LONGNVARCHAR
type.static final DataType
<byte[]> TheTypes.LONGVARBINARY
type.TheTypes.LONGVARCHAR
type.TheTypes.NCHAR
type.TheTypes.NCLOB
type.static final DataType
<BigDecimal> TheTypes.NUMERIC
type.TheTypes.NVARCHAR
type.static final DataType
<OffsetDateTime> TheTypes.TIMESTAMP_WITH_TIMEZONE
type.static final DataType
<OffsetTime> TheTypes.TIME_WITH_TIMEZONE
type.TheTypes.OTHER
type.TheTypes.REAL
type.TheTypes.STRUCT
type.TheResultSet
type.TheTypes.ROWID
type.TheTypes.SMALLINT
type.The unsignedTypes.SMALLINT
type.TheTypes.TIME
type.TheTypes.TIMESTAMP
type.static final DataType
<OffsetDateTime> TheTypes.TIMESTAMP_WITH_TIMEZONE
type.static final DataType
<OffsetTime> TheTypes.TIME_WITH_TIMEZONE
type.TheTypes.TINYINT
type.The unsignedTypes.TINYINT
type.TheUUID
type.static final DataType
<byte[]> TheTypes.VARBINARY
type.TheTypes.VARCHAR
type.TheXML
type.ATypes.SMALLINT
type that represents a year. -
Method Summary
Modifier and TypeMethodDescriptionstatic final DataType
<byte[]> BINARY
(int length) TheTypes.BINARY
type.static final DataType
<byte[]> BLOB
(int length) TheTypes.BLOB
type.CHAR
(int length) TheTypes.CHAR
type.CLOB
(int length) TheTypes.CLOB
type.DECFLOAT
(int precision) TheDecfloat
type.static final DataType
<BigDecimal> DECIMAL
(int precision) TheTypes.DECIMAL
type.static final DataType
<BigDecimal> DECIMAL
(int precision, int scale) TheTypes.DECIMAL
type.static final DataType
<BigInteger> DECIMAL_INTEGER
(int precision) The zero-scaleTypes.DECIMAL
type.INSTANT
(int precision) ATypes.TIMESTAMP_WITH_TIMEZONE
type that uses UTC as time zone.static final DataType
<LocalDateTime> LOCALDATETIME
(int precision) TheTypes.TIMESTAMP
type.LOCALTIME
(int precision) TheTypes.TIME
type.LONGNVARCHAR
(int length) TheTypes.LONGNVARCHAR
type.static final DataType
<byte[]> LONGVARBINARY
(int length) TheTypes.LONGVARBINARY
type.LONGVARCHAR
(int length) TheTypes.LONGVARCHAR
type.NCHAR
(int length) TheTypes.NCHAR
type.NCLOB
(int length) TheTypes.NCLOB
type.static final DataType
<BigDecimal> NUMERIC
(int precision) TheTypes.NUMERIC
type.static final DataType
<BigDecimal> NUMERIC
(int precision, int scale) TheTypes.NUMERIC
type.NVARCHAR
(int length) TheTypes.NVARCHAR
type.static final DataType
<OffsetDateTime> OFFSETDATETIME
(int precision) TheTypes.TIMESTAMP_WITH_TIMEZONE
type.static final DataType
<OffsetTime> OFFSETTIME
(int precision) TheTypes.TIME_WITH_TIMEZONE
type.TIME
(int precision) TheTypes.TIME
type.TIMESTAMP
(int precision) TheTypes.TIMESTAMP
type.static final DataType
<OffsetDateTime> TIMESTAMPWITHTIMEZONE
(int precision) TheTypes.TIMESTAMP_WITH_TIMEZONE
type.static final DataType
<OffsetTime> TIMEWITHTIMEZONE
(int precision) TheTypes.TIME_WITH_TIMEZONE
type.static final DataType
<byte[]> VARBINARY
(int length) TheTypes.VARBINARY
type.VARCHAR
(int length) TheTypes.VARCHAR
type.
-
Field Details
-
VARCHAR
TheTypes.VARCHAR
type. -
CHAR
TheTypes.CHAR
type. -
LONGVARCHAR
TheTypes.LONGVARCHAR
type. -
CLOB
TheTypes.CLOB
type. -
NVARCHAR
TheTypes.NVARCHAR
type. -
NCHAR
TheTypes.NCHAR
type. -
LONGNVARCHAR
TheTypes.LONGNVARCHAR
type. -
NCLOB
TheTypes.NCLOB
type. -
BOOLEAN
TheTypes.BOOLEAN
type. -
BIT
TheTypes.BIT
type. -
TINYINT
TheTypes.TINYINT
type. -
SMALLINT
TheTypes.SMALLINT
type. -
INTEGER
TheTypes.INTEGER
type. -
BIGINT
TheTypes.BIGINT
type. -
DECIMAL_INTEGER
The zero-scaleTypes.DECIMAL
type. -
TINYINTUNSIGNED
The unsignedTypes.TINYINT
type. -
SMALLINTUNSIGNED
The unsignedTypes.SMALLINT
type. -
INTEGERUNSIGNED
The unsignedTypes.INTEGER
type. -
BIGINTUNSIGNED
The unsignedTypes.BIGINT
type. -
DOUBLE
TheTypes.DOUBLE
type. -
FLOAT
TheTypes.FLOAT
type. -
REAL
TheTypes.REAL
type. -
NUMERIC
TheTypes.NUMERIC
type. -
DECIMAL
TheTypes.DECIMAL
type. -
DATE
TheTypes.DATE
type. -
TIMESTAMP
TheTypes.TIMESTAMP
type. -
TIME
TheTypes.TIME
type. -
INTERVAL
A vendor specificINTERVAL YEAR TO SECOND
data type, which combinesINTERVALYEARTOMONTH
andINTERVALDAYTOSECOND
.If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/intervalTypes
tofalse
. -
INTERVALYEARTOMONTH
The SQL standardINTERVAL YEAR TO MONTH
data type.If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/intervalTypes
tofalse
. -
INTERVALDAYTOSECOND
The SQL standardINTERVAL DAY TO SECOND
data type.If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/intervalTypes
tofalse
. -
LOCALDATE
TheTypes.DATE
type. -
LOCALTIME
TheTypes.TIME
type. -
LOCALDATETIME
TheTypes.TIMESTAMP
type. -
OFFSETTIME
TheTypes.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 inOffsetDateTime
). 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. -
OFFSETDATETIME
TheTypes.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 inOffsetDateTime
). 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. -
TIMEWITHTIMEZONE
TheTypes.TIME_WITH_TIMEZONE
type.An alias for
OFFSETTIME
-
TIMESTAMPWITHTIMEZONE
TheTypes.TIMESTAMP_WITH_TIMEZONE
type.An alias for
OFFSETDATETIME
-
INSTANT
ATypes.TIMESTAMP_WITH_TIMEZONE
type that uses UTC as time zone.Neither JDBC, nor most SQL databases support the
INSTANT
data type, which is often the only kind of timestamp which can be expected to behave across all server and client time zone settings. This implementation is backed by the database vendor'sTIMESTAMP WITH TIME ZONE
data type implementation, which may (e.g. Oracle) or may not (e.g. PostgreSQL) store the timestamp information. Irrespective of that storage, this type will always produce time zone agnostic instants in client code. -
YEAR
ATypes.SMALLINT
type that represents a year.While JDBC does not support this type, some dialects do, specifically those of the
SQLDialectCategory.MYSQL
category. -
BINARY
TheTypes.BINARY
type. -
VARBINARY
TheTypes.VARBINARY
type. -
LONGVARBINARY
TheTypes.LONGVARBINARY
type. -
BLOB
TheTypes.BLOB
type. -
OTHER
TheTypes.OTHER
type. -
ROWID
TheTypes.ROWID
type. -
RECORD
TheTypes.STRUCT
type. -
RESULT
TheResultSet
type.This is not a JDBC standard. This type emulates REF CURSOR types and similar constructs
-
UUID
TheUUID
type.This is not a JDBC standard. This type handles UUID types where they are supported
-
JSON
TheJSON
type.This is not a JDBC standard. This type handles JSON types where they are supported.
If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/jsonTypes
tofalse
. -
JSONB
TheJSONB
type.This is not a JDBC standard. This type handles JSONB types where they are supported.
If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/jsonTypes
tofalse
. -
XML
TheXML
type.This is not a JDBC standard. This type handles XML types where they are supported.
If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/xmlTypes
tofalse
. -
GEOGRAPHY
TheGeography
type.This is not a JDBC standard. This type handles spatial types where they are supported.
If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/spatialTypes
tofalse
.This data type is supported only by the commercial editions of jOOQ.
-
GEOMETRY
TheGeometry
type.This is not a JDBC standard. This type handles spatial types where they are supported.
If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/spatialTypes
tofalse
.This data type is supported only by the commercial editions of jOOQ.
-
DECFLOAT
TheDecfloat
type.This is not a JDBC standard. This type handles DECFLOAT types where they are supported.
If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/decfloatTypes
tofalse
.
-
-
Method Details
-
VARCHAR
TheTypes.VARCHAR
type. -
CHAR
TheTypes.CHAR
type. -
LONGVARCHAR
TheTypes.LONGVARCHAR
type. -
CLOB
TheTypes.CLOB
type. -
NVARCHAR
TheTypes.NVARCHAR
type. -
NCHAR
TheTypes.NCHAR
type. -
LONGNVARCHAR
TheTypes.LONGNVARCHAR
type. -
NCLOB
TheTypes.NCLOB
type. -
DECIMAL_INTEGER
The zero-scaleTypes.DECIMAL
type. -
NUMERIC
TheTypes.NUMERIC
type. -
NUMERIC
TheTypes.NUMERIC
type. -
DECIMAL
TheTypes.DECIMAL
type. -
DECIMAL
TheTypes.DECIMAL
type. -
TIMESTAMP
TheTypes.TIMESTAMP
type. -
TIME
TheTypes.TIME
type. -
LOCALTIME
TheTypes.TIME
type. -
LOCALDATETIME
TheTypes.TIMESTAMP
type. -
OFFSETTIME
TheTypes.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 inOffsetDateTime
). 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. -
OFFSETDATETIME
TheTypes.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 inOffsetDateTime
). 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. -
TIMEWITHTIMEZONE
TheTypes.TIME_WITH_TIMEZONE
type.An alias for
OFFSETTIME
-
TIMESTAMPWITHTIMEZONE
TheTypes.TIMESTAMP_WITH_TIMEZONE
type.An alias for
OFFSETDATETIME
-
INSTANT
ATypes.TIMESTAMP_WITH_TIMEZONE
type that uses UTC as time zone.Neither JDBC, nor most SQL databases support the
INSTANT
data type, which is often the only kind of timestamp which can be expected to behave across all server and client time zone settings. This implementation is backed by the database vendor'sTIMESTAMP WITH TIME ZONE
data type implementation, which may (e.g. Oracle) or may not (e.g. PostgreSQL) store the timestamp information. Irrespective of that storage, this type will always produce time zone agnostic instants in client code. -
BINARY
TheTypes.BINARY
type. -
VARBINARY
TheTypes.VARBINARY
type. -
LONGVARBINARY
TheTypes.LONGVARBINARY
type. -
BLOB
TheTypes.BLOB
type. -
DECFLOAT
TheDecfloat
type.This is not a JDBC standard. This type handles DECFLOAT types where they are supported.
If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/decfloatTypes
tofalse
.
-