ParameterMapper

internal class ParameterMapper(catalog: TypeCatalog, localConverters: List<ParameterConverter<*>>?, types: TypeLookup)

Entry point of the write conversion chain: hands a Kotlin value to the converters.

One of these belongs to each execution, over the TypeCatalog that execution pinned and whatever converters the query registered for itself. It is what the parameter serializer calls for every value bound to a statement.

Parameters

catalog

The pinned catalog to resolve converters and codecs against.

localConverters

Converters registered on the query itself, in registration order, or null where it registered none. Consulted ahead of the catalog's.

types

The lookup handed to converters, reading the same pinned catalog.

Constructors

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

Functions

Link copied to clipboard
fun convert(source: Any?, expectedOid: Int): Any?

Converts a Kotlin value into something a codec can encode.