MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / currentOperation

Function currentOperation

packages/orm/src/client/functions.ts:135–142  ·  view source on GitHub ↗
(_eb, args, { operation }: ZModelFunctionContext<any>)

Source from the content-addressed store, hash-verified

133};
134
135export const currentOperation: ZModelFunction<any> = (_eb, args, { operation }: ZModelFunctionContext<any>) => {
136 let result: string = operation;
137 const [casing] = args;
138 if (casing) {
139 result = processCasing(casing, result, operation);
140 }
141 return sql.lit(result);
142};
143
144function processCasing(casing: Expression<any>, result: string, model: string) {
145 const opNode = casing.toOperationNode();

Callers

nothing calls this directly

Calls 1

processCasingFunction · 0.85

Tested by

no test coverage detected