@metreeca/keep
    Preparing search index...
    Drain: { alias?: Identifier } & (
        | { form: "atomic"; query: Query<Atomic> }
        | { form: "template"; query: Query<Template> }
        | { form: "locale"; query: Query<Locale> }
        | { form: "projection"; query: Query<Projection> }
        | {
            form: "union";
            query: Query<Cell>;
            variants: ReadonlyMap<Shape, Drain>;
        }
    )

    The retrieval requested at a node of a flake.

    Pairs the query requested at the node with the projection alias bound to it, if any. The drain also settles the form the query takes against the node's range, so consumers switch on the form instead of classifying the query again:

    • atomic — an atomic requesting the value as it stands, on any range;
    • template — a template on a resource or reference range;
    • locale — a locale on a localised range;
    • projection — a projection on a collection;
    • union — a union on a union-typed range, with its alternatives resolved to the variants they reach.

    The form follows the query's retrieval keys: a query stating none is an atomic (§5.3).

    The cardinality of the property the node steps through and the presence of an alias together classify a branch. isModelBranch and isQueryBranch tell plain retrievals apart, and isProbeBranch picks out projected ones.

    Type Declaration

    • Optional Readonlyalias?: Identifier

      The projection alias, when a query projects the node.

      The name the node's values are returned under in the projected result. Absent on an unprojected retrieval.

    • { form: "atomic"; query: Query<Atomic> }
      • Readonlyform: "atomic"

        The query requests the value as it stands: no further shape, whatever the range (§5.3).

      • Readonlyquery: Query<Atomic>

        The query requested at the node, criteria included; its retrieval half states no key.

    • { form: "template"; query: Query<Template> }
      • Readonlyform: "template"

        The query expands a resource, naming the properties to retrieve.

      • Readonlyquery: Query<Template>

        The query requested at the node, criteria included; its retrieval half is the template.

    • { form: "locale"; query: Query<Locale> }
      • Readonlyform: "locale"

        The query retrieves a localised property tag by tag, as a structured map (§5.4).

      • Readonlyquery: Query<Locale>

        The query requested at the node; its retrieval half is the locale map.

    • { form: "projection"; query: Query<Projection> }
      • Readonlyform: "projection"

        The query retrieves a collection as rows of computed values (§5.2).

      • Readonlyquery: Query<Projection>

        The query requested at the node, criteria included; its retrieval half is the projection.

    • { form: "union"; query: Query<Cell>; variants: ReadonlyMap<Shape, Drain> }
      • Readonlyform: "union"

        The query addresses a union-typed range, one alternative per variant it reaches (§5.5).

      • Readonlyquery: Query<Cell>

        The query requested at the node, criteria included: a keyed union, or a single alternative standing for every variant it fits.

      • Readonlyvariants: ReadonlyMap<Shape, Drain>

        The drain of each variant the query reaches, keyed by variant.

        A variant no alternative fits is absent. A variant reached by several alternatives carries them folded into one request. Each drain is settled against its variant alone, so it is never itself a union.