PgRange

class PgRange(val rangeOid: Int, val elementOid: Int, val flags: Byte, val lowerBound: Any?, val upperBound: Any?) : PgContainer

Represents a PostgreSQL range type (e.g., int4range, tsrange).

Constructors

Link copied to clipboard
internal constructor(rangeOid: Int, elementOid: Int, flags: Byte, lowerBound: Any?, upperBound: Any?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val containerOid: Int

OID of the container's own type — the array type rather than its element type, the range type rather than its subtype.

Link copied to clipboard

OID of the underlying element type of the range bounds.

Link copied to clipboard
val flags: Byte

Bitmask flags representing the range properties (e.g., empty, inclusive/exclusive bounds).

Link copied to clipboard

The range contains nothing at all. All other flags are meaningless when this is set.

Link copied to clipboard

The lower bound is part of the range - [ rather than ( in PostgreSQL's own notation.

Link copied to clipboard

The range extends without limit downwards, written (, in PostgreSQL.

Link copied to clipboard

The lower bound is present but NULL, which is distinct from being unbounded.

Link copied to clipboard

The upper bound is part of the range - ] rather than ).

Link copied to clipboard

The range extends without limit upwards, written ,).

Link copied to clipboard

The upper bound is present but NULL, which is distinct from being unbounded.

Link copied to clipboard

The lower bound value of the range, or null if infinite/unbounded.

Link copied to clipboard

OID of the range type.

Link copied to clipboard

The upper bound value of the range, or null if infinite/unbounded.

Functions

Link copied to clipboard
inline fun <T> lowerBound(): T

Returns the lower bound, cast to T.

Link copied to clipboard
inline fun <T> upperBound(): T

Returns the upper bound, cast to T.