TypeRegistry
Registry holding the mapping of database types, data codecs, and type converters.
TypeRegistry manages the state for mapping PostgreSQL Object Identifiers (OIDs) to their corresponding type definitions (PgType), as well as providing resolution mechanisms for parameter encoders, result decoders, and data serialization.
Properties
An immutable snapshot dictionary for database binary/text codecs.
The registry handling custom mappings and converters between Kotlin objects and PostgreSQL types.
An immutable snapshot dictionary representing the current mapping of PostgreSQL OIDs and types.
A lock used to ensure thread-safe updates to the registry's internal state.
Functions
Registers a custom codec. If OID and schema are missing (dynamic type in multi-schema), it will be mapped globally for deserialization but resolved in-flight for serialization.
Replaces the entire type map with a new instance, ensuring thread-safety. Additionally applies custom codecs waiting for an OID.