Header menu logo FCQRS

Query Module

Types and nested modules

Type/Module Description

Internal

IAwaitable

IAwaitableDisposable

ISubscribe<'TDataEvent>

ISubscribe

The canonical subscription stream: a non-generic shorthand for ISubscribe<IMessageWithCID> — the type every FCQRS projection / read-your-writes subscription actually uses (cf. IEnumerable vs IEnumerable<T>). Lets consumers write ISubscribe instead of the closed generic, and inject it by that name.

Functions and values

Function or value Description

asDefaultSubscribe inner

Full Usage: asDefaultSubscribe inner

Parameters:
Returns: ISubscribe

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

inner : ISubscribe<IMessageWithCID>
Returns: ISubscribe

autoPublish handle offset evt

Full Usage: autoPublish handle offset evt

Parameters:
    handle : int64 -> obj -> unit
    offset : int64
    evt : obj

Returns: IMessageWithCID list

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<'T>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.

handle : int64 -> obj -> unit
offset : int64
evt : obj
Returns: IMessageWithCID list

filterPublish handle offset evt

Full Usage: filterPublish handle offset evt

Parameters:
    handle : int64 -> obj -> Notify
    offset : int64
    evt : obj

Returns: IMessageWithCID list

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).

handle : int64 -> obj -> Notify
offset : int64
evt : obj
Returns: IMessageWithCID list

init actorApi offsetCount handler

Full Usage: init actorApi offsetCount handler

Parameters:
    actorApi : IActor
    offsetCount : int64
    handler : int64 -> obj -> 'TDataEvent list

Returns: ISubscribe<'TDataEvent>
actorApi : IActor
offsetCount : int64
handler : int64 -> obj -> 'TDataEvent list
Returns: ISubscribe<'TDataEvent>

Type something to start searching.