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

Method getModelFields

packages/orm/src/client/zod/factory.ts:170–173  ·  view source on GitHub ↗

* Returns model field entries, excluding Unsupported fields.

(model: string)

Source from the content-addressed store, hash-verified

168 * Returns model field entries, excluding Unsupported fields.
169 */
170 private getModelFields(model: string): [string, FieldDef][] {
171 const modelDef = requireModel(this.schema, model);
172 return Object.entries(modelDef.fields).filter(([, def]) => def.type !== 'Unsupported');
173 }
174
175 private shouldIncludeRelations(options?: CreateSchemaOptions): boolean {
176 return options?.relationDepth === undefined || options.relationDepth > 0;

Callers 12

makeWhereSchemaMethod · 0.95
makeSelectSchemaMethod · 0.95
makeOmitSchemaMethod · 0.95
makeOrderBySchemaMethod · 0.95
makeDistinctSchemaMethod · 0.95
makeCreateDataSchemaMethod · 0.95
makeUpdateDataSchemaMethod · 0.95
makeSumAvgInputSchemaMethod · 0.95
makeMinMaxInputSchemaMethod · 0.95
makeGroupBySchemaMethod · 0.95

Calls 1

requireModelFunction · 0.90

Tested by

no test coverage detected