createRange

fun createRange(typeName: String, schema: String = "", lower: Any? = null, upper: Any? = null, isLowerInclusive: Boolean = true, isUpperInclusive: Boolean = false, isLowerInfinite: Boolean = (lower == null), isUpperInfinite: Boolean = (upper == null), isLowerNull: Boolean = false, isUpperNull: Boolean = false): PgRange

Creates a new instance of a PostgreSQL range type using its name and schema.

Return

A new io.github.octaviusframework.driver.container.PgRange instance.

Parameters

typeName

The name of the range type.

schema

The schema where the range type is defined.

lower

The lower bound value.

upper

The upper bound value.

isLowerInclusive

Whether the lower bound is inclusive.

isUpperInclusive

Whether the upper bound is inclusive.

isLowerInfinite

Whether the lower bound is infinite.

isUpperInfinite

Whether the upper bound is infinite.

isLowerNull

Whether the lower bound is null.

isUpperNull

Whether the upper bound is null.


fun createRange(oid: Int, lower: Any? = null, upper: Any? = null, isLowerInclusive: Boolean = true, isUpperInclusive: Boolean = false, isLowerInfinite: Boolean = (lower == null), isUpperInfinite: Boolean = (upper == null), isLowerNull: Boolean = false, isUpperNull: Boolean = false): PgRange

Creates a new instance of a PostgreSQL range type using its Object ID (OID).

Return

A new PgRange instance.

Parameters

oid

The OID of the range type.

lower

The lower bound value.

upper

The upper bound value.

isLowerInclusive

Whether the lower bound is inclusive.

isUpperInclusive

Whether the upper bound is inclusive.

isLowerInfinite

Whether the lower bound is infinite.

isUpperInfinite

Whether the upper bound is infinite.

isLowerNull

Whether the lower bound is null.

isUpperNull

Whether the upper bound is null.

Throws

if the type is not found or is not a range.