DefaultDeserializationContext

internal class DefaultDeserializationContext(catalog: TypeCatalog, localConverters: List<ResultConverter<*, *>>?, val types: TypeLookup) : DeserializationContext

Constructors

Link copied to clipboard
constructor(catalog: TypeCatalog, localConverters: List<ResultConverter<*, *>>?, types: TypeLookup)

Properties

Link copied to clipboard
open override val types: TypeLookup

The type system as this execution pinned it: dictionaries, containers and OID resolution.

Functions

Link copied to clipboard
open override fun <T> convert(source: Any?, expectedType: KType, sourceType: PgType, pathSegment: String? = null): T

Converts a raw value to the expected type using registered converters.

open fun <T> convert(source: Any?, expectedType: KType, sourceOid: Int, pathSegment: String? = null): T

Converts a raw value to the expected type using registered converters, resolving the PostgreSQL type from its OID.

Link copied to clipboard
open override fun findConverter(sourceClass: KClass<*>, expectedType: KType, sourceType: PgType): ResultConverter<Any, *>?

The query's own converters first, then the catalog's, and within each the class the codec produced - or a sealed class above it - before Any::class, so a converter registered on the query displaces one the session registered for the same class, and a catch-all registered on the query displaces both.