Skip to content
From 0.5.0 the packages continue as @cqrs-ddd, documented at aristoteliss.github.io/ddd-cqrs; NestJS applications add @cqrs-ddd/nestjs. This site documents the 0.4.x line.

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