Available in versions: Dev (3.21) | Latest (3.20) | 3.19 | 3.18 | 3.17

PostgreSQL INT8RANGE type

Supported by ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

The INT8RANGE type stores an open or closed interval of BIGINT values, such as [0, 10). jOOQ offers support for this type via a org.jooq.postgres.extensions.types.LongRange type that exposes the data structure in form of a set of bounds and flags.

LongRange range = create.fetchValue(T.INT8RANGE, T.ID.eq(id));
Long lower = range.lower();
Long 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!

The jOOQ Logo