ProjectionModule
PackageFCQRS
Constructors for the projection-handler shapes.
Summary
| Name | Signature | Synopsis |
|---|---|---|
| multi | multi progress handle | Multi-event handler with full control. |
| single | single progress handle | Single-event handler: just update the read model (returns unit); each aggregate event is then published to subscribers as-is. |
| filtered | filtered progress handle | Filtered single-event handler: update the read model, then return Publish/Suppress to decide whether *this* event wakes subscribers. |
| ofEntities | ofEntities names p | Reads only the events of the named entities: an aggregate's, saga's, or workflow's name, as registered. |
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
| Name | Type | Description |
|---|---|---|
| progress | ProjectionProgress | |
| handle | obj -> IMessageWithCID list |
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.
Parameters
| Name | Type | Description |
|---|---|---|
| progress | ProjectionProgress | |
| handle | obj -> unit |
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). Use it for the common "publish each
event except the intermediate ones" case, without building a list.
Parameters
| Name | Type | Description |
|---|---|---|
| progress | ProjectionProgress | |
| handle | obj -> Notify |
Returns
Projection
Reads only the events of the named entities: an aggregate's, saga's, or workflow's name, as
registered. A name selects the persistence IDs that start with it, escaped as Akka escapes a
sharding region's name (Uri.EscapeDataString), and "/". The journal queries select those
rows in SQL, so other entities' events are not fetched or deserialized. On SQLite and SQL
Server the full scan reads only the names' range of the journal's persistence-ID index, and the queries
bounded by a journal number read every row above it; PostgreSQL reads other entities' rows
in every query. A pass reads each persistence ID's events with a query of its own.
A pass hands the named entities' events to the handler in journal order, as without a
filter. An empty list reads every entity.
Parameters
| Name | Type | Description |
|---|---|---|
| names | string list | |
| p | Projection |
Returns
Projection