Class BusQuerier

The BusQuerier implements an Bus based Querier, i.e., extension of the abstract Querier base class, allowing Model queries to be executed via a Bus. To use this class, provide it to the Linker by either extending it, and decorating the extending class with the Target decorator, or by preemptively supplying an instance of this class to the Linker.

Example

Provide the BusQuerier to the Linker:

import { BusQuerier } from '@sgrud/bus';
import { Linker } from '@sgrud/core';

new Linker<typeof BusQuerier>([
[BusQuerier, new BusQuerier('io.github.sgrud.example')]
]);

See

Hierarchy (view full)

Constructors

Properties

[provide]: "sgrud.data.Querier" = 'sgrud.data.Querier'

Magic string by which this class is provided.

types: Set<Querier.Type> = ...

A set containing the Querier.Types this BusQuerier handles. As a Bus is a long-lived duplex stream, this Querier can handle 'mutation', 'query' and 'subscription' types.

handle: Handle

The Bus.Handle to commit queries under.

prioritize: number | Map<Model.Type<Model<any>>, number> = 0

The dynamic or static prioritization.

Default Value

0

See

priority

Methods

Generated using TypeDoc