ProjectionModule

PackageFCQRS
Constructors for the two projection-handler shapes.

Summary

NameSignatureSynopsis
multimulti lastOffset handleMulti-event handler with full control.
singlesingle lastOffset handleSingle-event handler: just update the read model (returns unit); each aggregate event is then published to subscribers as-is.
filteredfiltered lastOffset handleFiltered single-event handler: update the read model, then return Publish/Suppress to decide whether *this* event wakes subscribers.

multi

multi lastOffset handle
Member
Multi-event handler with 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.

Parameters

NameTypeDescription
lastOffsetint64
handleint64 -> obj -> IMessageWithCID list

Returns

Projection

single

single lastOffset handle
Member
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.

Parameters

NameTypeDescription
lastOffsetint64
handleint64 -> obj -> unit

Returns

Projection

filtered

filtered lastOffset handle
Member
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). Use it for the common "publish each event except the intermediate ones" case, without building a list.

Parameters

NameTypeDescription
lastOffsetint64
handleint64 -> obj -> Notify

Returns

Projection