Comunica
    Preparing search index...

    Interface IPhysicalQueryPlanLogger

    A physical query plan logger collects operations, which can then be serialized as a query plan to JSON.

    interface IPhysicalQueryPlanLogger {
        finalize: () => Promise<void>;
        getNodeForOutput: (output: unknown) => IPhysicalQueryPlanNode | undefined;
        logOperation: (args: ILogOperationArgs) => IPhysicalQueryPlanNode;
        toJson: () => any;
    }

    Implemented by

    Index

    Properties

    finalize: () => Promise<void>

    Wait for all outstanding measurements of this plan to complete.

    Statistics such as the produced number of results are only known once a node's output has been consumed. Serializing the plan without awaiting this first yields a plan that varies between runs, so this must be awaited before IPhysicalQueryPlanLogger#toJson.

    getNodeForOutput: (output: unknown) => IPhysicalQueryPlanNode | undefined

    Obtain the node that produced the given query operation output.

    Nodes are associated with an output via IPhysicalQueryPlanNode#setOutput, which allows operations that consume an output to find the node that produced it, without having to pass plan nodes around themselves.

    Type Declaration

      • (output: unknown): IPhysicalQueryPlanNode | undefined
      • Parameters

        • output: unknown

          A query operation output.

        Returns IPhysicalQueryPlanNode | undefined

        The node that produced the output, or undefined if the output is unknown.

    logOperation: (args: ILogOperationArgs) => IPhysicalQueryPlanNode

    Log an operation, and obtain a handle to the plan node that was created for it.

    Every call creates a distinct node, so an operation that is executed more than once results in more than one node. Hierarchies are built by passing the handle of an earlier call as parentNode. Exactly one node may be logged without a parent.

    A repeated node is the exception: it stands for all evaluations of one thing within one operation, so logging it again under the same parent returns the node that already stands for them. Operations that open such a group per evaluation therefore need not remember it.

    Type Declaration

    toJson: () => any

    Serialize the collected query plan to JSON.