PersistedWrite
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
PersistedWrite<
TEntity,TConstraint>(options?): <TResult>(target,key,descriptor) =>void
Defined in: packages/core/persistence/decorators/persisted-write.decorator.ts:76
Applies the canonical persistence write lifecycle to a repository method whose first argument is the aggregate being written.
Equivalent to stacking, outermost to innermost:
@Cache(options.cache) → @AcknowledgePersisted(...) →
@MapPersistenceErrors(...), each selecting the first argument.
- A rejected write translates known constraint errors, leaves the persisted version baseline unchanged and performs no cache maintenance.
- A resolved write acknowledges the persisted version first, then runs best-effort cache maintenance.
It provides no transaction or event-delivery guarantee beyond those decorators: promise resolution must mean a durable autocommitted write. Use the individual decorators for other signatures, for writes that must not acknowledge (such as deletes), or for caller-owned ordering.
Type Parameters
Section titled “Type Parameters”TEntity
Section titled “TEntity”TEntity extends PersistedAggregate
TConstraint
Section titled “TConstraint”TConstraint extends string = never
Parameters
Section titled “Parameters”options?
Section titled “options?”PersistedWriteOptions<TEntity, TConstraint> = {}
Returns
Section titled “Returns”<TResult>(target, key, descriptor) => void