Header menu logo FCQRS

Projection Module

Constructors for the two projection-handler shapes.

Functions and values

Function or value Description

filtered lastOffset handle

Full Usage: filtered lastOffset handle

Parameters:
    lastOffset : int
    handle : int64 -> obj -> Notify

Returns: Projection

Filtered single-event handler: update the read model, then return Publish/Suppress to decide whether *this* event wakes subscribers. The middle rung between `single` (always publish) and `multi` (return an arbitrary notification list) — reach for it in the common "publish each event except the intermediate ones" case, without building a list.

lastOffset : int
handle : int64 -> obj -> Notify
Returns: Projection

multi lastOffset handle

Full Usage: multi lastOffset handle

Parameters:
Returns: Projection

Multi-event handler: full control — return exactly the notifications to publish (empty list = nothing). Use when notifications must be filtered or transformed, e.g. suppressing intermediate events so read-your-writes only wakes on the final one.

lastOffset : int
handle : int64 -> obj -> IMessageWithCID list
Returns: Projection

single lastOffset handle

Full Usage: single lastOffset handle

Parameters:
    lastOffset : int
    handle : int64 -> obj -> unit

Returns: Projection

Single-event handler: just update the read model (returns unit); each aggregate event is then published to subscribers as-is. The common case when every event is worth notifying.

lastOffset : int
handle : int64 -> obj -> unit
Returns: Projection

Type something to start searching.