Package-level declarations

Types

Link copied to clipboard
internal class KotlinToPostgresConverter(typeRegistry: TypeRegistry, dynamicDtoStrategy: DynamicDtoSerializationStrategy = DynamicDtoSerializationStrategy.AUTOMATIC_WHEN_UNAMBIGUOUS)

Orchestrates conversion of Kotlin objects to PostgreSQL JDBC parameters. Delegates standard type handling to StandardTypeMappingRegistry and complex serialization to PgTextSerializer.

Link copied to clipboard
internal data class ParsedParameter(val name: String, val startIndex: Int, val endIndex: Int)

Represents a named parameter found in SQL with its position.

Link copied to clipboard
internal class PgTextSerializer(typeRegistry: TypeRegistry, dynamicDtoStrategy: DynamicDtoSerializationStrategy)

Serializes Kotlin objects into PostgreSQL text protocol literals. Handles escaping, quoting, and recursive structures (arrays and composites).

Link copied to clipboard
data class PositionalQuery(val sql: String, val params: List<Any?>)

Result of parameter expansion: SQL with positional markers and the converted values.

Link copied to clipboard

Parses PostgreSQL SQL queries to find named parameters (e.g., :param).

Link copied to clipboard
internal class PostgresToKotlinConverter(typeRegistry: TypeRegistry)

Converts values from PostgreSQL (as String) to appropriate Kotlin types.

Link copied to clipboard
internal class ResultSetValueExtractor(typeRegistry: TypeRegistry)

Intelligently extracts values from ResultSet. Uses "fast path" (native rs.get*() methods) for standard types and delegates to PostgresToKotlinConverter for complex types (enum, composite, array).

Link copied to clipboard
internal data class StandardTypeHandler<T : Any>(val pgTypeName: String, val kotlinClass: KClass<T>, val fromResultSet: (ResultSet, Int) -> T??, val fromString: (String) -> T, val toJdbc: (T) -> Any, val toPgString: (T) -> String)
Link copied to clipboard

Central registry and single source of truth for mappings of standard PostgreSQL types to Kotlin types.