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

Function currentModel

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

Source from the content-addressed store, hash-verified

124 .exhaustive();
125
126export const currentModel: ZModelFunction<any> = (_eb, args, { model }: ZModelFunctionContext<any>) => {
127 let result = model;
128 const [casing] = args;
129 if (casing) {
130 result = processCasing(casing, result, model);
131 }
132 return sql.lit(result);
133};
134
135export const currentOperation: ZModelFunction<any> = (_eb, args, { operation }: ZModelFunctionContext<any>) => {
136 let result: string = operation;

Callers

nothing calls this directly

Calls 1

processCasingFunction · 0.85

Tested by

no test coverage detected