PgArray

class PgArray(val arrayOid: Int, val elementOid: Int, val dimensions: List<ArrayDimension>, val elements: List<Any?>) : PgContainer

Represents a PostgreSQL array type.

Constructors

Link copied to clipboard
internal constructor(arrayOid: Int, elementOid: Int, dimensions: List<ArrayDimension>, elements: List<Any?>)

Properties

Link copied to clipboard

OID of the array type.

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

List of dimensions for the array. A one-dimensional array has one entry; PostgreSQL arrays are rectangular, so a multi-dimensional one describes each axis here.

Link copied to clipboard

OID of the elements within the array.

Link copied to clipboard

Flat list of elements contained in the array. Multi-dimensional arrays are stored flattened in row-major order, so dimensions is what gives the flat list its shape.

Link copied to clipboard

The number of elements across every dimension, i.e. the size of the flat elements list.

Functions

Link copied to clipboard
inline fun <T> get(index: Int): T

Returns the element at index in the flat element list, cast to T.