SerializationContext

What a ParameterConverter is handed to convert the values nested inside the one it was given.

Going through convert rather than converting a nested value by hand is what keeps the failure legible: each call contributes a segment to the path of any MappingException raised below it, so an error in one attribute of a composite arrives naming that attribute.

Inheritors

Properties

Link copied to clipboard
abstract val types: TypeLookup

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

Functions

Link copied to clipboard
abstract fun convert(source: Any, expectedOid: Int, pathSegment: String? = null): Any?

Converts a Kotlin value to an object compatible with PostgreSQL using registered converters.

Link copied to clipboard
open fun defaultOidForClass(kClass: KClass<*>): Int?

The OID a value of kClass would be declared as, worked out from the class alone - for a container whose elements are not there to ask, such as an empty range or array.

Link copied to clipboard
abstract fun findConverter(source: Any, expectedOid: Int): ParameterConverter<Any>?

Looks up the converter that would claim a value, without converting anything.

Link copied to clipboard
abstract fun findConverterByClass(sourceClass: KClass<*>, expectedOid: Int): ParameterConverter<Any>?

Same as findConverter, keyed on a class rather than an instance.