MCPcopy Index your code
hub / github.com/directus/directus / constructor

Method constructor

api/src/services/fields.ts:80–94  ·  view source on GitHub ↗
(options: AbstractServiceOptions)

Source from the content-addressed store, hash-verified

78 schemaCache: Keyv<any>;
79
80 constructor(options: AbstractServiceOptions) {
81 this.knex = options.knex || getDatabase();
82 this.helpers = getHelpers(this.knex);
83 this.schemaInspector = options.knex ? createInspector(options.knex) : getSchemaInspector();
84 this.accountability = options.accountability || null;
85 this.itemsService = new ItemsService('directus_fields', options);
86 this.payloadService = new PayloadService('directus_fields', options);
87 this.schema = options.schema;
88
89 const { cache, systemCache, localSchemaCache } = getCache();
90
91 this.cache = cache;
92 this.systemCache = systemCache;
93 this.schemaCache = localSchemaCache;
94 }
95
96 async columnInfo(collection?: string): Promise<Column[]>;
97 async columnInfo(collection: string, field: string): Promise<Column>;

Callers

nothing calls this directly

Calls 5

createInspectorFunction · 0.90
getDatabaseFunction · 0.85
getSchemaInspectorFunction · 0.85
getHelpersFunction · 0.50
getCacheFunction · 0.50

Tested by

no test coverage detected