MultiRange

data class MultiRange<T : Any>(val elementClass: KClass<T>, val ranges: List<Range<T>>)

Represents a generic, user-friendly PostgreSQL multirange. This class is designed to be used in application code, mapping directly to/from io.github.octaviusframework.driver.container.PgMultirange.

A multirange is an ordered set of non-overlapping ranges: PostgreSQL merges anything that overlaps or touches and sorts what remains, so ranges comes back normalized however it was written. The per-range normalization of discrete subtypes described on Range applies to each range inside it too.

Type Parameters

T

The type of the range bounds.

Constructors

Link copied to clipboard
constructor(elementClass: KClass<T>, ranges: List<Range<T>>)
constructor(elementClass: KClass<T>, vararg ranges: Range<T>)

Creates a multirange from ranges given as a vararg.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The class of the bounds, needed to resolve the PostgreSQL multirange type.

Link copied to clipboard

The ranges this multirange holds.