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

Function convertCallClause

packages/graph/src/astToSteps.ts:995–1010  ·  view source on GitHub ↗

* Convert a CALL clause into a CallStep.

(callClause: CallClause)

Source from the content-addressed store, hash-verified

993 * Convert a CALL clause into a CallStep.
994 */
995function convertCallClause(callClause: CallClause): CallStep {
996 // Convert arguments (expressions) to condition values
997 const args = callClause.arguments.map((arg) => convertConditionValue(arg));
998
999 // Convert yield items
1000 const yieldItems: YieldItemConfig[] | undefined = callClause.yield?.map((item: YieldItem) => ({
1001 name: item.name,
1002 alias: item.alias,
1003 }));
1004
1005 return new CallStep({
1006 procedureName: callClause.procedure,
1007 arguments: args,
1008 yieldItems,
1009 });
1010}
1011
1012/**
1013 * Convert a SetValue AST node to a SetAssignmentValue.

Callers 2

processQuerySegmentsFunction · 0.85
processLegacyQueryFunction · 0.85

Calls 2

convertConditionValueFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected