ICommandRepository
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
Defined in: packages/core/application/ports/command-repository.port.ts:18
Contract for write-side command repositories.
Persists an entity or aggregate state into persistence storage.
Example
Section titled “Example”constructor(private readonly users: ICommandRepository<User, UserSnapshot>) {}
await this.users.save(user);Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”TEntity
Section titled “TEntity”TEntity = unknown
The aggregate entity or payload being persisted.
TResult
Section titled “TResult”TResult = unknown
The result type returned after persistence (or null on deletion).
Methods
Section titled “Methods”save()
Section titled “save()”save(
entity):Promise<TResult|null>
Defined in: packages/core/application/ports/command-repository.port.ts:25
Persists the aggregate/payload.
Returning null is the conventional deletion result used by the DDD cache
decorator to trigger eviction/barrier behavior.
Parameters
Section titled “Parameters”entity
Section titled “entity”TEntity
Returns
Section titled “Returns”Promise<TResult | null>