Skip to content

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.

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.

unknown

object

string | undefined