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

Function multiStatementToSteps

packages/graph/src/astToSteps.ts:507–518  ·  view source on GitHub ↗
(multiStatement: MultiStatement)

Source from the content-addressed store, hash-verified

505 * @returns A single-element array containing the MultiQueryStep.
506 */
507export function multiStatementToSteps(multiStatement: MultiStatement): readonly Step<any>[] {
508 // Convert each statement to its own step pipeline
509 const statements = multiStatement.statements.map((stmt) => {
510 if (stmt.type === "UnionQuery") {
511 return unionAstToSteps(stmt);
512 }
513 return astToSteps(stmt);
514 });
515
516 // Create a MultiQueryStep that executes all statements
517 return [new MultiQueryStep({}, statements as Step<any>[][])];
518}
519
520/**
521 * Convert a SET clause into a SetStep.

Callers 1

anyAstToStepsFunction · 0.85

Calls 3

unionAstToStepsFunction · 0.85
astToStepsFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected