Options
All
  • Public
  • Public/Protected
  • All
Menu

A projection that stores a state for each entity in its storage.

const projection = new PersistedEntityReduceProjection(catFedReducer, storage);
bus.onEvent((event) => projection.handleEvent(event));
const felixFed = await projection.getState("felix");

Type parameters

  • T

Hierarchy

  • PersistedEntityReduceProjection

Implements

Index

Constructors

constructor

Properties

Private eventFilter

eventFilter: function

Type declaration

    • Parameters

      Returns boolean

Private reducer

reducer: Reducer<T>

Private storage

storage: KeyValueStorage<T>

Methods

getAll

getState

  • getState(id: string): Promise<T>

handleEvent

  • handleEvent(event: Event): Promise<void>

rebuildStream

  • rebuildStream(): Writable

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc