convert
Converts a Kotlin value to an object compatible with PostgreSQL using registered converters.
Return
A value a registered codec can encode.
Parameters
source
The value to convert.
expectedOid
The expected PostgreSQL OID.
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.