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
FieldsModifier and TypeFieldDescriptionTheTypes.BIGINTtype.The unsignedTypes.BIGINTtype.static final DataType<byte[]> TheTypes.BINARYtype.TheTypes.BITtype.static final DataType<byte[]> TheTypes.BLOBtype.TheTypes.BOOLEANtype.TheTypes.CHARtype.TheTypes.CLOBtype.TheTypes.DATEtype.TheDecfloattype.static final DataType<BigDecimal> TheTypes.DECIMALtype.static final DataType<BigInteger> The zero-scaleTypes.DECIMALtype.TheTypes.DOUBLEtype.TheTypes.FLOATtype.TheGeographytype.TheGeometrytype.ATypes.TIMESTAMP_WITH_TIMEZONEtype that uses UTC as time zone.TheTypes.INTEGERtype.The unsignedTypes.INTEGERtype.static final DataType<YearToSecond> A vendor specificINTERVAL YEAR TO SECONDdata type, which combinesINTERVALYEARTOMONTHandINTERVALDAYTOSECOND.static final DataType<DayToSecond> The SQL standardINTERVAL DAY TO SECONDdata type.static final DataType<YearToMonth> The SQL standardINTERVAL YEAR TO MONTHdata type.TheJSONtype.TheJSONBtype.TheTypes.DATEtype.static final DataType<LocalDateTime> TheTypes.TIMESTAMPtype.TheTypes.TIMEtype.TheTypes.LONGNVARCHARtype.static final DataType<byte[]> TheTypes.LONGVARBINARYtype.TheTypes.LONGVARCHARtype.TheTypes.NCHARtype.TheTypes.NCLOBtype.static final DataType<BigDecimal> TheTypes.NUMERICtype.TheTypes.NVARCHARtype.static final DataType<OffsetDateTime> TheTypes.TIMESTAMP_WITH_TIMEZONEtype.static final DataType<OffsetTime> TheTypes.TIME_WITH_TIMEZONEtype.TheTypes.OTHERtype.TheTypes.REALtype.TheTypes.STRUCTtype.TheResultSettype.TheTypes.ROWIDtype.TheTypes.SMALLINTtype.The unsignedTypes.SMALLINTtype.TheTypes.TIMEtype.TheTypes.TIMESTAMPtype.static final DataType<OffsetDateTime> TheTypes.TIMESTAMP_WITH_TIMEZONEtype.static final DataType<OffsetTime> TheTypes.TIME_WITH_TIMEZONEtype.TheTypes.TINYINTtype.The unsignedTypes.TINYINTtype.TheUUIDtype.static final DataType<byte[]> TheTypes.VARBINARYtype.TheTypes.VARCHARtype.TheXMLtype.ATypes.SMALLINTtype that represents a year. -
Method Summary
Modifier and TypeMethodDescriptionstatic final DataType<byte[]> BINARY(int length) TheTypes.BINARYtype.static final DataType<byte[]> BLOB(int length) TheTypes.BLOBtype.CHAR(int length) TheTypes.CHARtype.CLOB(int length) TheTypes.CLOBtype.DECFLOAT(int precision) TheDecfloattype.static final DataType<BigDecimal> DECIMAL(int precision) TheTypes.DECIMALtype.static final DataType<BigDecimal> DECIMAL(int precision, int scale) TheTypes.DECIMALtype.static final DataType<BigInteger> DECIMAL_INTEGER(int precision) The zero-scaleTypes.DECIMALtype.INSTANT(int precision) ATypes.TIMESTAMP_WITH_TIMEZONEtype that uses UTC as time zone.static final DataType<LocalDateTime> LOCALDATETIME(int precision) TheTypes.TIMESTAMPtype.LOCALTIME(int precision) TheTypes.TIMEtype.LONGNVARCHAR(int length) TheTypes.LONGNVARCHARtype.static final DataType<byte[]> LONGVARBINARY(int length) TheTypes.LONGVARBINARYtype.LONGVARCHAR(int length) TheTypes.LONGVARCHARtype.NCHAR(int length) TheTypes.NCHARtype.NCLOB(int length) TheTypes.NCLOBtype.static final DataType<BigDecimal> NUMERIC(int precision) TheTypes.NUMERICtype.static final DataType<BigDecimal> NUMERIC(int precision, int scale) TheTypes.NUMERICtype.NVARCHAR(int length) TheTypes.NVARCHARtype.static final DataType<OffsetDateTime> OFFSETDATETIME(int precision) TheTypes.TIMESTAMP_WITH_TIMEZONEtype.static final DataType<OffsetTime> OFFSETTIME(int precision) TheTypes.TIME_WITH_TIMEZONEtype.TIME(int precision) TheTypes.TIMEtype.TIMESTAMP(int precision) TheTypes.TIMESTAMPtype.static final DataType<OffsetDateTime> TIMESTAMPWITHTIMEZONE(int precision) TheTypes.TIMESTAMP_WITH_TIMEZONEtype.static final DataType<OffsetTime> TIMEWITHTIMEZONE(int precision) TheTypes.TIME_WITH_TIMEZONEtype.static final DataType<byte[]> VARBINARY(int length) TheTypes.VARBINARYtype.VARCHAR(int length) TheTypes.VARCHARtype.
-
Field Details
-
VARCHAR
TheTypes.VARCHARtype. -
CHAR
TheTypes.CHARtype. -
LONGVARCHAR
TheTypes.LONGVARCHARtype. -
CLOB
TheTypes.CLOBtype. -
NVARCHAR
TheTypes.NVARCHARtype. -
NCHAR
TheTypes.NCHARtype. -
LONGNVARCHAR
TheTypes.LONGNVARCHARtype. -
NCLOB
TheTypes.NCLOBtype. -
BOOLEAN
TheTypes.BOOLEANtype. -
BIT
TheTypes.BITtype. -
TINYINT
TheTypes.TINYINTtype. -
SMALLINT
TheTypes.SMALLINTtype. -
INTEGER
TheTypes.INTEGERtype. -
BIGINT
TheTypes.BIGINTtype. -
DECIMAL_INTEGER
The zero-scaleTypes.DECIMALtype. -
TINYINTUNSIGNED
The unsignedTypes.TINYINTtype. -
SMALLINTUNSIGNED
The unsignedTypes.SMALLINTtype. -
INTEGERUNSIGNED
The unsignedTypes.INTEGERtype. -
BIGINTUNSIGNED
The unsignedTypes.BIGINTtype. -
DOUBLE
TheTypes.DOUBLEtype. -
FLOAT
TheTypes.FLOATtype. -
REAL
TheTypes.REALtype. -
NUMERIC
TheTypes.NUMERICtype. -
DECIMAL
TheTypes.DECIMALtype. -
DATE
TheTypes.DATEtype. -
TIMESTAMP
TheTypes.TIMESTAMPtype. -
TIME
TheTypes.TIMEtype. -
INTERVAL
A vendor specificINTERVAL YEAR TO SECONDdata type, which combinesINTERVALYEARTOMONTHandINTERVALDAYTOSECOND.If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/intervalTypestofalse. -
INTERVALYEARTOMONTH
The SQL standardINTERVAL YEAR TO MONTHdata type.If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/intervalTypestofalse. -
INTERVALDAYTOSECOND
The SQL standardINTERVAL DAY TO SECONDdata type.If you want to opt out of code generation support for this type, you can specify
/configuration/generator/generate/intervalTypestofalse. -
LOCALDATE
TheTypes.DATEtype. -
LOCALTIME
TheTypes.TIMEtype. -
LOCALDATETIME
TheTypes.TIMESTAMPtype. -
OFFSETTIME
TheTypes.TIME_WITH_TIMEZONEtype.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_TIMEZONEtype.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_TIMEZONEtype.An alias for
OFFSETTIME -
TIMESTAMPWITHTIMEZONE
TheTypes.TIMESTAMP_WITH_TIMEZONEtype.An alias for
OFFSETDATETIME -
INSTANT
ATypes.TIMESTAMP_WITH_TIMEZONEtype that uses UTC as time zone.Neither JDBC, nor most SQL databases support the
INSTANTdata 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 ZONEdata 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.SMALLINTtype that represents a year.While JDBC does not support this type, some dialects do, specifically those of the
SQLDialectCategory.MYSQLcategory. -
BINARY
TheTypes.BINARYtype. -
VARBINARY
TheTypes.VARBINARYtype. -
LONGVARBINARY
TheTypes.LONGVARBINARYtype. -
BLOB
TheTypes.BLOBtype. -
OTHER
TheTypes.OTHERtype. -
ROWID
TheTypes.ROWIDtype. -
RECORD
TheTypes.STRUCTtype. -
RESULT
TheResultSettype.This is not a JDBC standard. This type emulates REF CURSOR types and similar constructs
-
UUID
TheUUIDtype.This is not a JDBC standard. This type handles UUID types where they are supported
-
JSON
TheJSONtype.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/jsonTypestofalse. -
JSONB
TheJSONBtype.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/jsonTypestofalse. -
XML
TheXMLtype.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/xmlTypestofalse. -
GEOGRAPHY
TheGeographytype.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/spatialTypestofalse.This data type is supported only by the commercial editions of jOOQ.
-
GEOMETRY
TheGeometrytype.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/spatialTypestofalse.This data type is supported only by the commercial editions of jOOQ.
-
DECFLOAT
TheDecfloattype.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/decfloatTypestofalse.
-
-
Method Details
-
VARCHAR
TheTypes.VARCHARtype. -
CHAR
TheTypes.CHARtype. -
LONGVARCHAR
TheTypes.LONGVARCHARtype. -
CLOB
TheTypes.CLOBtype. -
NVARCHAR
TheTypes.NVARCHARtype. -
NCHAR
TheTypes.NCHARtype. -
LONGNVARCHAR
TheTypes.LONGNVARCHARtype. -
NCLOB
TheTypes.NCLOBtype. -
DECIMAL_INTEGER
The zero-scaleTypes.DECIMALtype. -
NUMERIC
TheTypes.NUMERICtype. -
NUMERIC
TheTypes.NUMERICtype. -
DECIMAL
TheTypes.DECIMALtype. -
DECIMAL
TheTypes.DECIMALtype. -
TIMESTAMP
TheTypes.TIMESTAMPtype. -
TIME
TheTypes.TIMEtype. -
LOCALTIME
TheTypes.TIMEtype. -
LOCALDATETIME
TheTypes.TIMESTAMPtype. -
OFFSETTIME
TheTypes.TIME_WITH_TIMEZONEtype.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_TIMEZONEtype.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_TIMEZONEtype.An alias for
OFFSETTIME -
TIMESTAMPWITHTIMEZONE
TheTypes.TIMESTAMP_WITH_TIMEZONEtype.An alias for
OFFSETDATETIME -
INSTANT
ATypes.TIMESTAMP_WITH_TIMEZONEtype that uses UTC as time zone.Neither JDBC, nor most SQL databases support the
INSTANTdata 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 ZONEdata 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.BINARYtype. -
VARBINARY
TheTypes.VARBINARYtype. -
LONGVARBINARY
TheTypes.LONGVARBINARYtype. -
BLOB
TheTypes.BLOBtype. -
DECFLOAT
TheDecfloattype.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/decfloatTypestofalse.
-