ContainerFactory

class ContainerFactory(typeManager: TypeManager)

A factory for creating PostgreSQL container types such as composites, ranges, and multiranges.

It utilizes the underlying TypeManager to resolve types by name or OID and instantiates the appropriate container representations.

Constructors

Link copied to clipboard
internal constructor(typeManager: TypeManager)

Functions

Link copied to clipboard

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

fun createComposite(typeName: String, schema: String = ""): PgComposite

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

Link copied to clipboard

Creates an empty PostgreSQL range type using its Object ID (OID).

fun createEmptyRange(typeName: String, schema: String = ""): PgRange

Creates an empty PostgreSQL range type using its name and schema.

Link copied to clipboard
fun createMultirange(oid: Int, vararg ranges: PgRange): PgMultirange

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

fun createMultirange(typeName: String, schema: String = "", vararg ranges: PgRange): PgMultirange

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

Link copied to clipboard
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).

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.