@metreeca/keep
    Preparing search index...

    Module @metreeca/keep-flake - v0.12.2

    Shape-driven traversal trees.

    A Shape and its retrieval template or collection query scatter what to fetch across independent probes: property requests, constraints, and transforms. A flake gathers those probes into one traversal tree. A connector walks that tree directly, instead of matching the raw shape against the raw input at every step.

    Three flavours of the tree are available:

    • shape — the full structural reach of a resource shape, with no input, built by createFlake;
    • model — the reach restricted to the properties a retrieval template addresses, each node carrying the drain requested for it, built by createFlake;
    • query — a collection member shape tagged with the constraints, ordering, and projections a collection query expresses, built by createQueryFlake.

    Every node, the root included, is a Flake. Its path locates it along the property axis and its pipe along the transform axis. A resource node branches along both axes, while a non-resource node is a bare leaf:

    • property branches — a node steps through its entries into one Branch per addressed Id / Type / Property; a name shared by several variants of a union-typed node takes a single branch;
    • transform stages — a node holds each Transform a query applies to it as a nested Flake under its transforms.

    Type Aliases

    Flake

    A node of a flake.

    Branch

    Property-step node of a flake.

    Drain

    The retrieval requested at a node of a flake.

    Transforms

    A node's transform stages, keyed by the Transform each stage applies.

    Entries

    A node's property branches, keyed by property name.

    Functions

    createFlake

    Builds a Flake from a Shape and an optional retrieval template.

    createQueryFlake

    Builds a flake from a collection's member shape and the query retrieving it.

    isComputedFlake

    Checks whether a Flake is a transform stage rather than a property or marker step.

    isAggregateFlake

    Checks whether a Flake is an aggregate transform stage.

    isScalarFlake

    Checks whether a Flake is a scalar (non-aggregating) transform stage.

    isGroupingFlake

    Checks whether a Flake groups the query.

    isDrainedFlake

    Checks whether a Flake requests any retrieval, at the node or anywhere beneath it.

    isConstrainedFlake

    Checks whether a Flake carries any constraint, ranking, or ordering slot, at the node or anywhere beneath it.

    isFilteredFlake

    Checks whether a Flake carries a filtering constraint, at the node or anywhere beneath it.

    isRequiredFlake

    Checks whether a Flake carries an existence-implying filter constraint, at the node or anywhere beneath it.

    hasValueOptions

    Checks whether a Flake's set matching constraints name at least one non-null value.

    hasDictionaryOptions

    Checks whether a Flake's set matching constraints include a localised dictionary option.

    hasNullOptions

    Checks whether a Flake's set matching constraints include an explicit null option.

    isBranch

    Checks whether a Flake is a Branch, that is a property or marker step whose entry is available.

    isPropertyBranch

    Checks whether a flake steps through a Property edge, regardless of what it retrieves: the union of model, query, and projected branches, excluding Id / Type markers and transform stages.

    isModelBranch

    Checks whether a flake steps through a single-valued Property, whose retrieval addresses one value and admits no collection constraints.

    isQueryBranch

    Checks whether a flake steps through a multi-valued Property, whose retrieval addresses a collection and carries the criteria narrowing it.

    isProbeBranch

    Checks whether a flake is projected by a query: its drain carries a projection alias.

    getFlakeProjections

    Collects every projected flake of a Flake into a flat list.

    getFlakeTransforms

    Lists a flake's own transform stages.

    getFlakeEntries

    Lists a flake's own property branches.

    getFlakeProjection

    Collects every projection in a Flake into an alias-keyed index.

    getFlakeGrouping

    Collects the grouping keys of a Flake.

    getFlakeFocusing

    Collects the focus keys of a Flake.

    getFlakeOrdering

    Collects the sort keys of a Flake, by ascending precedence.

    getFlakeVariant

    Selects the property branches of a node that one variant of its range declares.