Skip to main content

Interface: EntityEntryApi<Entity>

Methods for managing the state of an entity in a unit of work.

Type parameters

Type parameter
Entity extends object

Accessors

state

get state(): EntityState

Returns the current state of the entity.

Returns

EntityState

The state of the entity.

Source

packages/verse-core/src/uow.ts:103

Methods

setState()

setState(state: EntityState): void

Sets the state of the entity.

Parameters

ParameterTypeDescription
stateEntityStateThe state to be set for the entity.

Returns

void

Source

packages/verse-core/src/uow.ts:110


update()

update(values: Partial ↗️<Entity>): void

Updates an entity with the provided values.

Parameters

ParameterTypeDescription
valuesPartial ↗️<Entity>The values to update the entity with.

Returns

void

Example

uow.entry(album).update({title: 'Road Games', artist: 'Allan Holdsworth'});

Source

packages/verse-core/src/uow.ts:121