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

Function isForeignKeyField

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

Source from the content-addressed store, hash-verified

199}
200
201export function isForeignKeyField(schema: SchemaDef, model: string, field: string): boolean {
202 const fieldDef = getField(schema, model, field);
203 return !!fieldDef?.foreignKeyFor;
204}
205
206export function isRelationField(schema: SchemaDef, model: string, field: string): boolean {
207 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