MCPcopy Create free account
hub / github.com/codemix/graph / unionAstToSteps

Function unionAstToSteps

packages/graph/src/astToSteps.ts:478–484  ·  view source on GitHub ↗
(unionQuery: UnionQuery)

Source from the content-addressed store, hash-verified

476 * @returns A single-element array containing the QueryUnionStep.
477 */
478export function unionAstToSteps(unionQuery: UnionQuery): readonly Step<any>[] {
479 // Convert each query in the union to its own step pipeline
480 const branches = unionQuery.queries.map((query) => astToSteps(query));
481
482 // Create a QueryUnionStep that combines all branches
483 return [new QueryUnionStep({ all: unionQuery.all }, branches as Step<any>[][])];
484}
485
486/**
487 * Convert any parsed AST (Query, UnionQuery, or MultiStatement) to steps.

Callers 2

anyAstToStepsFunction · 0.85
multiStatementToStepsFunction · 0.85

Calls 2

astToStepsFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected