IPersistenceDialect
Defined in: packages/ddd-core/persistence/persistence-dialect.ts:8
Reads which unique constraint a persistence error violated. Core declares the
contract and knows no database; an adapter package implements it, such as
MikroOrmDialect of @cqrs-ddd/mikro-orm.
Methods
Section titled “Methods”uniqueViolation()
Section titled “uniqueViolation()”uniqueViolation(
error,entity):string|undefined
Defined in: packages/ddd-core/persistence/persistence-dialect.ts:15
The key of the unique constraint error violated while writing entity:
the entity property it covers, or the declared name of a multi-column
constraint. undefined when error is not a unique violation, or names a
constraint the dialect does not know.
Parameters
Section titled “Parameters”unknown
entity
Section titled “entity”object
Returns
Section titled “Returns”string | undefined