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

NameSignatureSynopsis
InitQueryApi.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.
InitQueryApi.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.
InitQueryApi.Init(actorApi, eventHandler, ?name, ?entities)Starts a projection whose handler returns the notifications to publish.
InitQueryApi.Init(actorApi, eventHandler, ?name, ?entities)Starts a projection whose handler returns the notifications to publish (F# list).

Init

QueryApi.Init(actorApi, eventHandler, ?name, ?entities)
Member
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

NameTypeDescription
actorApiIActor
eventHandlerFunc<obj, Notify>
namestring
entitiesstring

Returns

IProjection

Init

QueryApi.Init(actorApi, eventHandler, ?name, ?entities)
Member
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

NameTypeDescription
actorApiIActor
eventHandlerAction<obj>
namestring
entitiesstring

Returns

IProjection

Init

QueryApi.Init(actorApi, eventHandler, ?name, ?entities)
Member
Starts a projection whose handler returns the notifications to publish. An overload of Init, distinguished by the handler's return type.

Parameters

NameTypeDescription
actorApiIActor
eventHandlerFunc<obj, IList<IMessageWithCID>>
namestring
entitiesstring

Returns

IProjection

Init

QueryApi.Init(actorApi, eventHandler, ?name, ?entities)
Member
Starts a projection whose handler returns the notifications to publish (F# list).

Parameters

NameTypeDescription
actorApiIActor
eventHandlerFunc<obj, IMessageWithCID list>
namestring
entitiesstring

Returns

IProjection