EnterpriseDbStatementBuilder
This class is the BaseStatementBuilder-derived implementation for EnterpriseDB. It is automatically registered by EnterpriseDbBootstrap — you do not need to instantiate it directly under normal use.
Constructors
public EnterpriseDbStatementBuilder()
public EnterpriseDbStatementBuilder(IDbSetting dbSetting,
IResolver<Field, IDbSetting, string> convertFieldResolver = null,
IResolver<Type, Type> averageableClientTypeResolver = null)
The parameterless constructor defaults convertFieldResolver to EnterpriseDbConvertFieldResolver.
EnterpriseDB-specific generation notes
- Paging uses
LIMIT/LIMIT ... OFFSETfor Query/top-N queries and BatchQuery/skip-take queries. - Insert appends a trailing
RETURNING ... AS "Result"clause so the generated/primary key is returned in the same round trip. - InsertAll is a plain multi-row
INSERT ... VALUES (...), (...), ...— noRETURNINGclause, since EDB Postgres rejects aRETURNINGlist against a sub-table VALUES expression (see issue #1143). - Merge/MergeAll compile to
INSERT ... ON CONFLICT (qualifiers) DO UPDATE SET ..., each with a trailingRETURNINGclause (MergeAllalso returns a per-row__RepoDb_OrderColumnalongside the key, to align results back to the source rows). An identity column is inserted withOVERRIDING SYSTEM VALUEso an explicit value on the entity is respected instead of silently ignored. - Truncate appends
RESTART IDENTITY. - Passing a non-null
hintsargument to anyCreate*method throwsNotSupportedException, sinceEnterpriseDbDbSetting.AreTableHintsSupportedisfalse.
Usability
Use StatementBuilderMapper to override it with a custom implementation.
StatementBuilderMapper.Add(typeof(EDBConnection), new MyCustomEnterpriseDbStatementBuilder(dbSetting), true);