QueryApiType
PackageFCQRS
C#-friendly projection API. A projection follows each aggregate's and saga's own sequence
numbers, so it never skips a stored event. Without a name, it keeps its progress in memory and
reads the whole journal each time it starts. With a name, it stores its progress in the journal
database under that name and resumes where it stopped; a handler can then see an event again
after a crash. A handler that throws terminates the process. With entity names (an aggregate's,
saga's, or workflow's name), it reads only those entities' events, and other entities' rows stay
in the database; without them, it reads every entity. A name that starts with `fcqrs-` is
reserved for FCQRS's own projections and raises `ArgumentException`.
Specification
Kind
Type
Members
4
Examples
0
InitSignature
QueryApi.Init(actorApi, eventHandler, ?name, ?entities)
InitSignature
QueryApi.Init(actorApi, eventHandler, ?name, ?entities)
InitSignature
QueryApi.Init(actorApi, eventHandler, ?name, ?entities)
InitSignature
QueryApi.Init(actorApi, eventHandler, ?name, ?entities)
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Init | QueryApi.Init(actorApi, eventHandler, ?name, ?entities) | Starts a projection with a filtered single-event handler: the handler updates the read model and returns Publish/Suppress to say whether this event wakes subscribers. |
| Init | QueryApi.Init(actorApi, eventHandler, ?name, ?entities) | Starts a projection with a single-event handler: the handler just updates the read model (returns void); each aggregate event is then published to subscribers as-is. |
| Init | QueryApi.Init(actorApi, eventHandler, ?name, ?entities) | Starts a projection whose handler returns the notifications to publish. |
| Init | QueryApi.Init(actorApi, eventHandler, ?name, ?entities) | Starts a projection whose handler returns the notifications to publish (F# list). |
Starts a projection with a filtered single-event handler: the handler updates the read
model and returns Publish/Suppress to say whether this event wakes subscribers.
Parameters
| Name | Type | Description |
|---|---|---|
| actorApi | IActor | |
| eventHandler | Func<obj, Notify> | |
| name | string | |
| entities | string |
Returns
IProjection
Starts a projection with a single-event handler: the handler just updates the read model
(returns void); each aggregate event is then published to subscribers as-is. Use a
list-returning overload when notifications must be filtered or transformed.
Parameters
| Name | Type | Description |
|---|---|---|
| actorApi | IActor | |
| eventHandler | Action<obj> | |
| name | string | |
| entities | string |
Returns
IProjection
Starts a projection whose handler returns the notifications to publish. An overload of
Init, distinguished by the handler's return type.
Parameters
| Name | Type | Description |
|---|---|---|
| actorApi | IActor | |
| eventHandler | Func<obj, IList<IMessageWithCID>> | |
| name | string | |
| entities | string |
Returns
IProjection