EnterpriseDbDbHelper
This class implements IDbHelper for EnterpriseDB. It queries information_schema.columns (joined against pg_index/pg_namespace to detect primary keys and temporary-schema tables) to build the list of DbField objects RepoDB uses internally to generate SQL statements.
It is automatically registered by EnterpriseDbBootstrap — you do not need to instantiate it directly under normal use.
Properties
| Name | Description |
|---|---|
| DbTypeResolver | The IResolver<string, Type> used to convert an EnterpriseDB column type name into its equivalent .NET CLR type. Defaults to EnterpriseDbDbTypeNameToClientTypeResolver. |
GetScopeIdentity
GetScopeIdentity/GetScopeIdentityAsync execute SELECT lastval(); against the connection.
Retry on OperationInProgress
If the connection is already mid-operation, GetFields and GetScopeIdentity transparently retry once against a brand-new connection created from the same connection string. The failure is recognized by type name (NpgsqlOperationInProgressException) — RepoDb.Connector.EnterpriseDb wraps NpgsqlConnection directly rather than translating its exceptions, so Npgsql’s own exception type surfaces as-is.
Array Parameter Handling
For an array-valued parameter, the driver infers its EDBType directly from the CLR array value — ClientTypeToEDBDbTypeResolver is not consulted, since it has no combinable “Array” member to build one from. This helper only steps in for element conversions the driver can’t do on its own: DateOnly[]/TimeOnly[] arrays are converted to DateTime[]/TimeSpan[] before binding.
Usability
Only override this if you need a custom type resolver.
var dbHelper = new EnterpriseDbDbHelper(new MyCustomEnterpriseDbDbTypeNameToClientTypeResolver());
DbHelperMapper.Add<EDBConnection>(dbHelper, true);