PostgreSQL INT4RANGE type
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The INT4RANGE
type stores an open or closed interval of INTEGER values, such as [0, 10)
. jOOQ offers support for this type via a org.jooq.postgres.extensions.types.IntegerRange
type that exposes the data structure in form of a set of bounds and flags.
IntegerRange range = create.fetchValue(T.INT4RANGE, T.ID.eq(id)); Integer lower = range.lower(); Integer 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!