Hierarchy

  • QueryBus
    • QueryBus

Constructors

  • Parameters

    • container: Container
    • observableFactory: ObservableFactory
    • publisher: IPublisher<IEventLike>

    Returns QueryBus

Properties

_handlerMap: Map<string, IHandler<IQuery, unknown>>
_observableFactory: ObservableFactory
_publisher: IPublisher<IEventLike>
_status: StateTracker<ESState>
container: Container

Methods

  • Trigger processing of a given query in one of two ways:

    • If the current application can process the query, meaning the IQuery.$executionDomain property has been registered, the query will be processed synchronously to the main thread and returned.
    • If the current application cannot process the query, the query will be enqueued for processing via a publisher for processing externally and a the results awaited for return.

    Type Parameters

    • TRes

    Parameters

    • query: IQuery

      Query to be processed

    • Optional options: ExecuteOptions

    Returns Promise<TRes>

  • Internal

    Should not be used outside of the context of the library

    Parameters

    • event: IQuery
    • options: Record<string, unknown>

    Returns Promise<unknown>

  • Parameters

    • instance: any

    Returns void

  • Parameters

    • event: IQuery

    Returns Promise<void>

Generated using TypeDoc