convert

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.

Return

The converted value.

Parameters

source

The raw value to convert.

expectedType

The Kotlin type expected as the result.

sourceType

The PostgreSQL type of the raw value.

pathSegment

Optional segment name (e.g., property name or array index) for debugging purposes. If a MappingException occurs during conversion, this segment is added to the exception's path to help trace the exact location of the error in nested structures.