- java.lang.Object
- 
- org.jooq.impl.SQLDataType
 
- 
 public final class SQLDataType extends Object The SQL standard data types, as described inTypes.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
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static DataType<byte[]>BINARY(int length)TheTypes.BINARYtype.static DataType<byte[]>BLOB(int length)TheTypes.BLOBtype.static DataType<String>CHAR(int length)TheTypes.CHARtype.static DataType<String>CLOB(int length)TheTypes.CLOBtype.static DataType<BigDecimal>DECIMAL(int precision)TheTypes.DECIMALtype.static DataType<BigDecimal>DECIMAL(int precision, int scale)TheTypes.DECIMALtype.static DataType<BigInteger>DECIMAL_INTEGER(int precision)The zero-scaleTypes.DECIMALtype.static DataType<Instant>INSTANT(int precision)ATypes.TIMESTAMP_WITH_TIMEZONEtype that uses UTC as time zone.static DataType<LocalDateTime>LOCALDATETIME(int precision)TheTypes.TIMESTAMPtype.static DataType<LocalTime>LOCALTIME(int precision)TheTypes.TIMEtype.static DataType<String>LONGNVARCHAR(int length)TheTypes.LONGNVARCHARtype.static DataType<byte[]>LONGVARBINARY(int length)TheTypes.LONGVARBINARYtype.static DataType<String>LONGVARCHAR(int length)TheTypes.LONGVARCHARtype.static DataType<String>NCHAR(int length)TheTypes.NCHARtype.static DataType<String>NCLOB(int length)TheTypes.NCLOBtype.static DataType<BigDecimal>NUMERIC(int precision)TheTypes.NUMERICtype.static DataType<BigDecimal>NUMERIC(int precision, int scale)TheTypes.NUMERICtype.static DataType<String>NVARCHAR(int length)TheTypes.NVARCHARtype.static DataType<OffsetDateTime>OFFSETDATETIME(int precision)TheTypes.TIMESTAMP_WITH_TIMEZONEtype.static DataType<OffsetTime>OFFSETTIME(int precision)TheTypes.TIME_WITH_TIMEZONEtype.static DataType<Time>TIME(int precision)TheTypes.TIMEtype.static DataType<Timestamp>TIMESTAMP(int precision)TheTypes.TIMESTAMPtype.static DataType<OffsetDateTime>TIMESTAMPWITHTIMEZONE(int precision)TheTypes.TIMESTAMP_WITH_TIMEZONEtype.static DataType<OffsetTime>TIMEWITHTIMEZONE(int precision)TheTypes.TIME_WITH_TIMEZONEtype.static DataType<byte[]>VARBINARY(int length)TheTypes.VARBINARYtype.static DataType<String>VARCHAR(int length)TheTypes.VARCHARtype.
 
- 
- 
- 
Field Detail- 
VARCHARpublic static final DataType<String> VARCHAR TheTypes.VARCHARtype.
 - 
CHARpublic static final DataType<String> CHAR TheTypes.CHARtype.
 - 
LONGVARCHARpublic static final DataType<String> LONGVARCHAR TheTypes.LONGVARCHARtype.
 - 
CLOBpublic static final DataType<String> CLOB TheTypes.CLOBtype.
 - 
NVARCHARpublic static final DataType<String> NVARCHAR TheTypes.NVARCHARtype.
 - 
NCHARpublic static final DataType<String> NCHAR TheTypes.NCHARtype.
 - 
LONGNVARCHARpublic static final DataType<String> LONGNVARCHAR TheTypes.LONGNVARCHARtype.
 - 
NCLOBpublic static final DataType<String> NCLOB TheTypes.NCLOBtype.
 - 
BOOLEANpublic static final DataType<Boolean> BOOLEAN TheTypes.BOOLEANtype.
 - 
TINYINTpublic static final DataType<Byte> TINYINT TheTypes.TINYINTtype.
 - 
SMALLINTpublic static final DataType<Short> SMALLINT TheTypes.SMALLINTtype.
 - 
INTEGERpublic static final DataType<Integer> INTEGER TheTypes.INTEGERtype.
 - 
BIGINTpublic static final DataType<Long> BIGINT TheTypes.BIGINTtype.
 - 
DECIMAL_INTEGERpublic static final DataType<BigInteger> DECIMAL_INTEGER The zero-scaleTypes.DECIMALtype.
 - 
TINYINTUNSIGNEDpublic static final DataType<UByte> TINYINTUNSIGNED The unsignedTypes.TINYINTtype.
 - 
SMALLINTUNSIGNEDpublic static final DataType<UShort> SMALLINTUNSIGNED The unsignedTypes.SMALLINTtype.
 - 
INTEGERUNSIGNEDpublic static final DataType<UInteger> INTEGERUNSIGNED The unsignedTypes.INTEGERtype.
 - 
BIGINTUNSIGNEDpublic static final DataType<ULong> BIGINTUNSIGNED The unsignedTypes.BIGINTtype.
 - 
DOUBLEpublic static final DataType<Double> DOUBLE TheTypes.DOUBLEtype.
 - 
FLOATpublic static final DataType<Double> FLOAT TheTypes.FLOATtype.
 - 
REALpublic static final DataType<Float> REAL TheTypes.REALtype.
 - 
NUMERICpublic static final DataType<BigDecimal> NUMERIC TheTypes.NUMERICtype.
 - 
DECIMALpublic static final DataType<BigDecimal> DECIMAL TheTypes.DECIMALtype.
 - 
DATEpublic static final DataType<Date> DATE TheTypes.DATEtype.
 - 
TIMESTAMPpublic static final DataType<Timestamp> TIMESTAMP TheTypes.TIMESTAMPtype.
 - 
TIMEpublic static final DataType<Time> TIME TheTypes.TIMEtype.
 - 
INTERVALpublic static final DataType<YearToSecond> INTERVAL A vendor specificINTERVAL YEAR TO SECONDdata type, which combinesINTERVALYEARTOMONTHandINTERVALDAYTOSECOND.
 - 
INTERVALYEARTOMONTHpublic static final DataType<YearToMonth> INTERVALYEARTOMONTH The SQL standardINTERVAL YEAR TO MONTHdata type.
 - 
INTERVALDAYTOSECONDpublic static final DataType<DayToSecond> INTERVALDAYTOSECOND The SQL standardINTERVAL DAY TO SECONDdata type.
 - 
LOCALDATEpublic static final DataType<LocalDate> LOCALDATE TheTypes.DATEtype.
 - 
LOCALTIMEpublic static final DataType<LocalTime> LOCALTIME TheTypes.TIMEtype.
 - 
LOCALDATETIMEpublic static final DataType<LocalDateTime> LOCALDATETIME TheTypes.TIMESTAMPtype.
 - 
OFFSETTIMEpublic static final DataType<OffsetTime> 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.
 - 
OFFSETDATETIMEpublic static final DataType<OffsetDateTime> 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.
 - 
TIMEWITHTIMEZONEpublic static final DataType<OffsetTime> TIMEWITHTIMEZONE TheTypes.TIME_WITH_TIMEZONEtype.An alias for OFFSETTIME
 - 
TIMESTAMPWITHTIMEZONEpublic static final DataType<OffsetDateTime> TIMESTAMPWITHTIMEZONE TheTypes.TIMESTAMP_WITH_TIMEZONEtype.An alias for OFFSETDATETIME
 - 
INSTANTpublic static final DataType<Instant> 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.
 - 
BINARYpublic static final DataType<byte[]> BINARY TheTypes.BINARYtype.
 - 
VARBINARYpublic static final DataType<byte[]> VARBINARY TheTypes.VARBINARYtype.
 - 
LONGVARBINARYpublic static final DataType<byte[]> LONGVARBINARY TheTypes.LONGVARBINARYtype.
 - 
BLOBpublic static final DataType<byte[]> BLOB TheTypes.BLOBtype.
 - 
OTHERpublic static final DataType<Object> OTHER TheTypes.OTHERtype.
 - 
ROWIDpublic static final DataType<RowId> ROWID TheTypes.ROWIDtype.
 - 
RECORDpublic static final DataType<Record> RECORD TheTypes.STRUCTtype.
 - 
RESULTpublic static final DataType<Result<Record>> RESULT TheResultSettype.This is not a SQL or JDBC standard. This type emulates REF CURSOR types and similar constructs 
 - 
UUIDpublic static final DataType<UUID> UUID TheUUIDtype.This is not a SQL or JDBC standard. This type handles UUID types where they are supported 
 - 
JSONpublic static final DataType<JSON> JSON TheJSONtype.This is not a SQL or JDBC standard. This type handles JSON types where they are supported. 
 - 
JSONBpublic static final DataType<JSONB> JSONB TheJSONBtype.This is not a SQL or JDBC standard. This type handles JSONB types where they are supported 
 
- 
 - 
Method Detail- 
VARCHARpublic static final DataType<String> VARCHAR(int length) TheTypes.VARCHARtype.
 - 
CHARpublic static final DataType<String> CHAR(int length) TheTypes.CHARtype.
 - 
LONGVARCHARpublic static final DataType<String> LONGVARCHAR(int length) TheTypes.LONGVARCHARtype.
 - 
CLOBpublic static final DataType<String> CLOB(int length) TheTypes.CLOBtype.
 - 
NVARCHARpublic static final DataType<String> NVARCHAR(int length) TheTypes.NVARCHARtype.
 - 
NCHARpublic static final DataType<String> NCHAR(int length) TheTypes.NCHARtype.
 - 
LONGNVARCHARpublic static final DataType<String> LONGNVARCHAR(int length) TheTypes.LONGNVARCHARtype.
 - 
NCLOBpublic static final DataType<String> NCLOB(int length) TheTypes.NCLOBtype.
 - 
DECIMAL_INTEGERpublic static final DataType<BigInteger> DECIMAL_INTEGER(int precision) The zero-scaleTypes.DECIMALtype.
 - 
NUMERICpublic static final DataType<BigDecimal> NUMERIC(int precision) TheTypes.NUMERICtype.
 - 
NUMERICpublic static final DataType<BigDecimal> NUMERIC(int precision, int scale) TheTypes.NUMERICtype.
 - 
DECIMALpublic static final DataType<BigDecimal> DECIMAL(int precision) TheTypes.DECIMALtype.
 - 
DECIMALpublic static final DataType<BigDecimal> DECIMAL(int precision, int scale) TheTypes.DECIMALtype.
 - 
TIMESTAMPpublic static final DataType<Timestamp> TIMESTAMP(int precision) TheTypes.TIMESTAMPtype.
 - 
TIMEpublic static final DataType<Time> TIME(int precision) TheTypes.TIMEtype.
 - 
LOCALTIMEpublic static final DataType<LocalTime> LOCALTIME(int precision) TheTypes.TIMEtype.
 - 
LOCALDATETIMEpublic static final DataType<LocalDateTime> LOCALDATETIME(int precision) TheTypes.TIMESTAMPtype.
 - 
OFFSETTIMEpublic static final DataType<OffsetTime> OFFSETTIME(int precision) 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.
 - 
OFFSETDATETIMEpublic static final DataType<OffsetDateTime> OFFSETDATETIME(int precision) 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.
 - 
TIMEWITHTIMEZONEpublic static final DataType<OffsetTime> TIMEWITHTIMEZONE(int precision) TheTypes.TIME_WITH_TIMEZONEtype.An alias for OFFSETTIME
 - 
TIMESTAMPWITHTIMEZONEpublic static final DataType<OffsetDateTime> TIMESTAMPWITHTIMEZONE(int precision) TheTypes.TIMESTAMP_WITH_TIMEZONEtype.An alias for OFFSETDATETIME
 - 
INSTANTpublic static final DataType<Instant> INSTANT(int precision) 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.
 - 
BINARYpublic static final DataType<byte[]> BINARY(int length) TheTypes.BINARYtype.
 - 
VARBINARYpublic static final DataType<byte[]> VARBINARY(int length) TheTypes.VARBINARYtype.
 - 
LONGVARBINARYpublic static final DataType<byte[]> LONGVARBINARY(int length) TheTypes.LONGVARBINARYtype.
 - 
BLOBpublic static final DataType<byte[]> BLOB(int length) TheTypes.BLOBtype.
 
- 
 
-