Link Search Menu Expand Document

EnterpriseDbDbTypeNameToClientTypeResolver


This IResolver<string, Type> implementation converts an EnterpriseDB database type name — as returned by information_schema.columns.data_type — into its equivalent .NET CLR type (e.g. character varying/text/jsonstring, numeric/moneydecimal, byteabyte[], uuidGuid). It is the default DbTypeResolver used by EnterpriseDbDbHelper.

Geometric types (box, circle, line, lseg, path, point, polygon), pg_lsn, tid, and text-search types (tsquery, tsvector) have no CLR representation on the Npgsql-backed RepoDb.Connector.EnterpriseDb driver this provider is built on. These, along with any other unrecognized type name, fall back to typeof(object).

Usability

var resolver = new EnterpriseDbDbTypeNameToClientTypeResolver();
var clrType = resolver.Resolve("uuid"); // typeof(Guid)