PgType

sealed class PgType(val oid: Int, val name: String, val schema: String)

Represents a PostgreSQL data type.

This sealed class hierarchy maps to PostgreSQL's internal type system, providing a structured representation of types, including their Object Identifier (OID), name, and the schema they belong to.

Inheritors

Constructors

Link copied to clipboard
protected constructor(oid: Int, name: String, schema: String)

Types

Link copied to clipboard
data class Array(val oid: Int, val name: String, val schema: String, val elementOid: Int) : PgType

Represents a PostgreSQL array type.

Link copied to clipboard
data class Base(val oid: Int, val name: String, val schema: String) : PgType

Represents a standard PostgreSQL base type (e.g., int4, text, varchar).

Link copied to clipboard
data class Composite(val oid: Int, val name: String, val schema: String, val attributes: LinkedHashMap<String, Int>, val relationOid: Int = 0, val attributeNumbers: List<Int> = emptyList()) : PgType

Represents a PostgreSQL composite type (row type).

Link copied to clipboard
data class Domain(val oid: Int, val name: String, val schema: String, val baseTypeOid: Int) : PgType

Represents a PostgreSQL domain type.

Link copied to clipboard
data class Enum(val oid: Int, val name: String, val schema: String, val values: List<String>) : PgType

Represents a PostgreSQL enum type.

Link copied to clipboard
data class Multirange(val oid: Int, val name: String, val schema: String, val rangeOid: Int) : PgType

Represents a PostgreSQL multirange type.

Link copied to clipboard
data class Range(val oid: Int, val name: String, val schema: String, val subtypeOid: Int) : PgType

Represents a PostgreSQL range type.

Link copied to clipboard
data object Record : PgType

Represents the special PostgreSQL record pseudo-type.

Link copied to clipboard
data object Void : PgType

Represents the special PostgreSQL void pseudo-type.

Properties

Link copied to clipboard
open val name: String

The name of the type.

Link copied to clipboard
open val oid: Int

The Object Identifier (OID) of the type.

Link copied to clipboard
open val schema: String

The schema in which the type is defined.