Package-level declarations

Types

Link copied to clipboard
data class DynamicDto

Represents a polymorphic object for database storage, mapping to the dynamic_dto PostgreSQL type.

Link copied to clipboard

Interface for handling conversion between Kotlin types and PostgreSQL types. Classes extending this interface are automatically scanned at the initialization

Link copied to clipboard

Represents standard, built-in PostgreSQL data types. Used for type-safe type specification in the withPgType method.

Link copied to clipboard
data class PgTyped(val value: Any?, val pgType: QualifiedName)

Wraps a value to explicitly specify the target PostgreSQL type.

Link copied to clipboard
data class QualifiedName(val schema: String, val name: String, val isArray: Boolean = false)

Represents a qualified PostgreSQL name (schema + object name). Handles quoting correctly even if names contain dots.

Link copied to clipboard
interface TypeHandler<T : Any>

Interface for handling conversion between Kotlin types and PostgreSQL types.

Properties

Link copied to clipboard
expect val LocalDate.Companion.DISTANT_FUTURE: LocalDate

The maximum LocalDate value, maps to PostgreSQL 'infinity' for DATE type.

expect val LocalDateTime.Companion.DISTANT_FUTURE: LocalDateTime

The maximum LocalDateTime value, maps to PostgreSQL 'infinity' for TIMESTAMP type.

actual val LocalDate.Companion.DISTANT_FUTURE: LocalDate

The maximum LocalDate value, maps to PostgreSQL 'infinity' for DATE type.

actual val LocalDateTime.Companion.DISTANT_FUTURE: LocalDateTime

The maximum LocalDateTime value, maps to PostgreSQL 'infinity' for TIMESTAMP type.

actual val LocalDate.Companion.DISTANT_FUTURE: LocalDate

The maximum LocalDate value, maps to PostgreSQL 'infinity' for DATE type.

actual val LocalDateTime.Companion.DISTANT_FUTURE: LocalDateTime

The maximum LocalDateTime value, maps to PostgreSQL 'infinity' for TIMESTAMP type.

Link copied to clipboard
expect val LocalDate.Companion.DISTANT_PAST: LocalDate

The minimum LocalDate value, maps to PostgreSQL '-infinity' for DATE type.

expect val LocalDateTime.Companion.DISTANT_PAST: LocalDateTime

The minimum LocalDateTime value, maps to PostgreSQL '-infinity' for TIMESTAMP type.

actual val LocalDate.Companion.DISTANT_PAST: LocalDate

The minimum LocalDate value, maps to PostgreSQL '-infinity' for DATE type.

actual val LocalDateTime.Companion.DISTANT_PAST: LocalDateTime

The minimum LocalDateTime value, maps to PostgreSQL '-infinity' for TIMESTAMP type.

actual val LocalDate.Companion.DISTANT_PAST: LocalDate

The minimum LocalDate value, maps to PostgreSQL '-infinity' for DATE type.

actual val LocalDateTime.Companion.DISTANT_PAST: LocalDateTime

The minimum LocalDateTime value, maps to PostgreSQL '-infinity' for TIMESTAMP type.

Link copied to clipboard
internal val MAX_DATETIME: LocalDateTime
Link copied to clipboard
internal val MAX_TIME: LocalTime
Link copied to clipboard
internal val MIN_DATETIME: LocalDateTime
Link copied to clipboard
internal val MIN_TIME: LocalTime
Link copied to clipboard
internal const val NANOS_PER_ONE: Int
Link copied to clipboard
internal const val YEAR_MAX: Int
Link copied to clipboard
internal const val YEAR_MIN: Int

Functions

Link copied to clipboard

Wraps a value in PgTyped to explicitly specify the target PostgreSQL type in a type-safe manner.

Wraps a value in PgTyped using explicit QualifiedName class.

fun Any?.withPgType(name: String, schema: String = "", isArray: Boolean = false): PgTyped

Wraps a value in PgTyped with explicit schema and name.