QueryModule

PackageFCQRS

Summary

NameSignatureSynopsis
asDefaultSubscribeasDefaultSubscribe innerAdapt a generic ISubscribe<IMessageWithCID> to the non-generic ISubscribe (forwards every Subscribe overload to the inner subscription).
autoPublishautoPublish handle offset evtAdapt a "single-event" projection handler — one that just updates the read model and returns unit — to the canonical list-returning shape: after the handler runs, the journal event itself is published to subscribers whenever it is an IMessageWithCID.
filterPublishfilterPublish handle offset evtAdapt a "filtered" projection handler — one that updates the read model and returns Publish/Suppress — to the canonical list-returning shape.
initinit actorApi offsetCount handlerNo description available.

asDefaultSubscribe

asDefaultSubscribe inner
Member
Adapt a generic ISubscribe<IMessageWithCID> to the non-generic ISubscribe (forwards every Subscribe overload to the inner subscription).

Parameters

NameTypeDescription
innerISubscribe<IMessageWithCID>

Returns

ISubscribe

autoPublish

autoPublish handle offset evt
Member
Adapt a "single-event" projection handler — one that just updates the read model and returns unit — to the canonical list-returning shape: after the handler runs, the journal event itself is published to subscribers whenever it is an IMessageWithCID. Aggregate Event&lt;'T&gt;s are; saga internals are not, so subscribers only ever see aggregate events. This is the common projection (notify with each event as-is); write a list-returning handler when notifications must be filtered or transformed — e.g. suppressing intermediate events so read-your-writes only wakes on the final one.

Parameters

NameTypeDescription
handleint64 -> obj -> unit
offsetint64
evtobj

Returns

IMessageWithCID list

filterPublish

filterPublish handle offset evt
Member
Adapt a "filtered" projection handler — one that updates the read model and returns Publish/Suppress — to the canonical list-returning shape. Like autoPublish, but the handler gets a per-event say over whether subscribers wake: on Publish the journal event itself is notified (when it is an IMessageWithCID), on Suppress nothing is. The middle ground between autoPublish (always notify) and a hand-written list handler (notify anything).

Parameters

NameTypeDescription
handleint64 -> obj -> Notify
offsetint64
evtobj

Returns

IMessageWithCID list

init

init actorApi offsetCount handler
Member

Parameters

NameTypeDescription
actorApiIActor
offsetCountint64
handlerint64 -> obj -> 'TDataEvent list

Returns

ISubscribe<'TDataEvent>