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

Function isScalarField

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

Source from the content-addressed store, hash-verified

194}
195
196export function isScalarField(schema: SchemaDef, model: string, field: string): boolean {
197 const fieldDef = getField(schema, model, field);
198 return !fieldDef?.relation && !fieldDef?.foreignKeyFor;
199}
200
201export function isForeignKeyField(schema: SchemaDef, model: string, field: string): boolean {
202 const fieldDef = getField(schema, model, field);

Callers 2

createFunction · 0.90
updateFunction · 0.90

Calls 1

getFieldFunction · 0.70

Tested by

no test coverage detected