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

Function getFieldAttributes

packages/cli/src/actions/pull/provider/sqlite.ts:408–417  ·  view source on GitHub ↗
({ fieldName, fieldType, services })

Source from the content-addressed store, hash-verified

406 },
407
408 getFieldAttributes({ fieldName, fieldType, services }) {
409 const factories: DataFieldAttributeFactory[] = [];
410
411 // Add @updatedAt for DateTime fields named updatedAt or updated_at
412 if (fieldType === 'DateTime' && (fieldName.toLowerCase() === 'updatedat' || fieldName.toLowerCase() === 'updated_at')) {
413 factories.push(new DataFieldAttributeFactory().setDecl(getAttributeRef('@updatedAt', services)));
414 }
415
416 return factories;
417 },
418};
419
420/**

Callers

nothing calls this directly

Calls 3

getAttributeRefFunction · 0.90
pushMethod · 0.80
setDeclMethod · 0.45

Tested by

no test coverage detected