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

Function getField

packages/orm/src/client/query-utils.ts:77–80  ·  view source on GitHub ↗
(schema: SchemaDef, model: string, field: string)

Source from the content-addressed store, hash-verified

75}
76
77export function getField(schema: SchemaDef, model: string, field: string) {
78 const modelDef = getModel(schema, model);
79 return modelDef?.fields[field];
80}
81
82export function requireField(schema: SchemaDef, modelOrType: string, field: string) {
83 const modelDef = getModel(schema, modelOrType);

Callers 14

resolveFieldsMethod · 0.90
fixReversedResultMethod · 0.90
prepareArgsForExtResultFunction · 0.90
applyExtResultToRowFunction · 0.90
processEnumSelectionMethod · 0.90
getFieldFunction · 0.90
handleMethod · 0.90
postProcessRowMethod · 0.90
isScalarFieldFunction · 0.70
isForeignKeyFieldFunction · 0.70

Calls 1

getModelFunction · 0.70

Tested by

no test coverage detected