TypeLookup

class TypeLookup(catalogSource: () -> TypeCatalog, searchPathProvider: () -> List<String>)

The type system as something to read: dictionaries, containers and OID resolution, and nothing that writes.

This is what a converter is handed. A conversion has no business registering a codec, a converter or a type - it is running inside an execution that pinned its catalog before the first byte went out, so a registration made here could not affect the conversion it was made from, and would reach every other session on the database instead. Registration lives on TypeManager, which is reached from a session rather than from a conversion; there is no way back to one from here.

What it reads depends on where it came from: TypeManager.pinnedTo fixes it to one catalog for the length of an execution, while the one TypeManager reads through follows whatever its database's holder publishes.

Constructors

Link copied to clipboard
internal constructor(catalogSource: () -> TypeCatalog, searchPathProvider: () -> List<String>)

Properties

Link copied to clipboard

Everything the driver knows about this database: dictionaries, converters and registrations, as one value.

Link copied to clipboard

The dictionary maintaining TypeCodec implementations.

Link copied to clipboard

Factory for creating container types (like composites).

Link copied to clipboard

The dictionary mapping PostgreSQL type names to their OIDs and vice versa.

Functions

Link copied to clipboard
fun resolveOid(typeName: String, schema: String = "", isArray: Boolean = false): Int

Resolves an OID for a given type name, considering the current search path.