ParameterConverter
Turns a Kotlin value into something a codec can encode for the wire.
This is the write half of the conversion SPI, and the mirror of ResultConverter. A converter does not produce bytes: it produces a value some registered codec knows how to encode — a String for an enum label, a PgComposite for a data class — and the codec does the rest. Register one on a session through TypeManager.registerParameterConverter, or on a single query through registerParameterConverter.
Converters are consulted in reverse registration order, so a later one wins over an earlier one, and the first whose canConvert answers true takes the value. A value nothing claims is passed through untouched, which is right for a scalar the codec already accepts; where the target OID is known and its codec cannot accept that class, the driver raises MappingException (NO_CONVERTER_FOUND) naming both sides instead of letting it fail one layer down as an encoding error.
Type Parameters
The Kotlin type this converter accepts.
Inheritors
Properties
The Kotlin class this converter handles. The default canConvert also accepts its subtypes.
Functions
Decides whether this converter handles the value at hand.
Names the PostgreSQL type to declare for the converted value, where nothing else has named one.