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 DataType<byte[]>
TheTypes.BINARY
type.TheTypes.BIT
type.static DataType<byte[]>
TheTypes.BLOB
type.TheTypes.BOOLEAN
type.TheTypes.CHAR
type.TheTypes.CLOB
type.TheTypes.DATE
type.static DataType<BigDecimal>
TheTypes.DECIMAL
type.static DataType<BigInteger>
The zero-scaleTypes.DECIMAL
type.TheTypes.DOUBLE
type.TheTypes.FLOAT
type.ATypes.TIMESTAMP_WITH_TIMEZONE
type that uses UTC as time zone.TheTypes.INTEGER
type.The unsignedTypes.INTEGER
type.static DataType<YearToSecond>
A vendor specificINTERVAL YEAR TO SECOND
data type, which combinesINTERVALYEARTOMONTH
andINTERVALDAYTOSECOND
.static DataType<DayToSecond>
The SQL standardINTERVAL DAY TO SECOND
data type.static DataType<YearToMonth>
The SQL standardINTERVAL YEAR TO MONTH
data type.TheJSON
type.TheJSONB
type.TheTypes.DATE
type.static DataType<LocalDateTime>
TheTypes.TIMESTAMP
type.TheTypes.TIME
type.TheTypes.LONGNVARCHAR
type.static DataType<byte[]>
TheTypes.LONGVARBINARY
type.TheTypes.LONGVARCHAR
type.TheTypes.NCHAR
type.TheTypes.NCLOB
type.static DataType<BigDecimal>
TheTypes.NUMERIC
type.TheTypes.NVARCHAR
type.static DataType<OffsetDateTime>
TheTypes.TIMESTAMP_WITH_TIMEZONE
type.static 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 DataType<OffsetDateTime>
TheTypes.TIMESTAMP_WITH_TIMEZONE
type.static DataType<OffsetTime>
TheTypes.TIME_WITH_TIMEZONE
type.TheTypes.TINYINT
type.The unsignedTypes.TINYINT
type.TheUUID
type.static DataType<byte[]>
TheTypes.VARBINARY
type.TheTypes.VARCHAR
type.TheXML
type. -
Method Summary
Modifier and TypeMethodDescriptionstatic DataType<byte[]>
BINARY(int length)
TheTypes.BINARY
type.static DataType<byte[]>
BLOB(int length)
TheTypes.BLOB
type.CHAR(int length)
TheTypes.CHAR
type.CLOB(int length)
TheTypes.CLOB
type.static DataType<BigDecimal>
DECIMAL(int precision)
TheTypes.DECIMAL
type.static DataType<BigDecimal>
DECIMAL(int precision, int scale)
TheTypes.DECIMAL
type.static 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 DataType<LocalDateTime>
LOCALDATETIME(int precision)
TheTypes.TIMESTAMP
type.LOCALTIME(int precision)
TheTypes.TIME
type.LONGNVARCHAR(int length)
TheTypes.LONGNVARCHAR
type.static 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 DataType<BigDecimal>
NUMERIC(int precision)
TheTypes.NUMERIC
type.static DataType<BigDecimal>
NUMERIC(int precision, int scale)
TheTypes.NUMERIC
type.NVARCHAR(int length)
TheTypes.NVARCHAR
type.static DataType<OffsetDateTime>
OFFSETDATETIME(int precision)
TheTypes.TIMESTAMP_WITH_TIMEZONE
type.static DataType<OffsetTime>
OFFSETTIME(int precision)
TheTypes.TIME_WITH_TIMEZONE
type.TIME(int precision)
TheTypes.TIME
type.TIMESTAMP(int precision)
TheTypes.TIMESTAMP
type.static DataType<OffsetDateTime>
TIMESTAMPWITHTIMEZONE(int precision)
TheTypes.TIMESTAMP_WITH_TIMEZONE
type.static DataType<OffsetTime>
TIMEWITHTIMEZONE(int precision)
TheTypes.TIME_WITH_TIMEZONE
type.static 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
. -
INTERVALYEARTOMONTH
The SQL standardINTERVAL YEAR TO MONTH
data type. -
INTERVALDAYTOSECOND
The SQL standardINTERVAL DAY TO SECOND
data type. -
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. -
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 SQL or JDBC standard. This type emulates REF CURSOR types and similar constructs
-
UUID
TheUUID
type.This is not a SQL or JDBC standard. This type handles UUID types where they are supported
-
JSON
TheJSON
type.This is not a SQL or JDBC standard. This type handles JSON types where they are supported.
-
JSONB
TheJSONB
type.This is not a SQL or JDBC standard. This type handles JSONB types where they are supported
-
XML
TheXML
type.This is not a SQL or JDBC standard. This type handles XML types where they are supported
-
-
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.
-