GlobalTypeRegistry

Global registry for managing database type registries, keyed by the physical database (host, port, database name) they belong to.

In standard JDBC environments, connection pools (like HikariCP) use URLs to identify different databases. This registry ensures that type mappings and user-registered converters are correctly cached and isolated per database, ignoring the parts of the URL (credentials, SSL settings, timeouts, ...) that don't affect the type catalog.

Functions

Link copied to clipboard
internal fun ensureLoaded(key: RegistryKey, executor: QueryExecutor)

Ensures that database types are loaded into the registry for the given database. This method is internal to the driver.

Link copied to clipboard

Retrieves or creates a TypeRegistry for the specified database. This method is internal to the driver.

Link copied to clipboard
internal fun reload(key: RegistryKey, executor: QueryExecutor)

Explicitly reloads the type dictionary from the database. This is internally invoked by driver connection mechanisms when a schema refresh is requested.

Link copied to clipboard

Removes the registry for a given database URL to prevent memory leaks if a connection (pool) pointing to dynamic URLs is closed.