This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
PostgreSQL TSTZRANGE type
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The TSTZRANGE
type stores an open or closed interval of TIMESTAMP WITH TIME ZONE values, such as [2010-01-01 00:00:00+02:00, 2011-01-01 00:00:00+02:00)
. jOOQ offers support for this type via a org.jooq.postgres.extensions.types.OffsetDateTimeRange
type that exposes the data structure in form of a set of bounds and flags.
OffsetDateTimeRange range = create.fetchValue(T.TSTZRANGE, T.ID.eq(id)); OffsetDateTime lower = range.lower(); OffsetDateTime upper = range.upper(); boolean lowerIncluding = range.lowerIncluding(); boolean upperIncluding = range.upperIncluding(); boolean empty = range.isEmpty();
Support for this data type is included in the jooq-postgres-extensions module.
Feedback
Do you have any feedback about this page? We'd love to hear it!