MCPcopy
hub / github.com/directus/directus / getSchemaInspector

Function getSchemaInspector

api/src/database/index.ts:208–218  ·  view source on GitHub ↗
(database?: Knex)

Source from the content-addressed store, hash-verified

206}
207
208export function getSchemaInspector(database?: Knex): SchemaInspector {
209 if (inspector) {
210 return inspector;
211 }
212
213 database ??= getDatabase();
214
215 inspector = createInspector(database);
216
217 return inspector;
218}
219
220export async function hasDatabaseConnection(database?: Knex): Promise<boolean> {
221 database = database ?? getDatabase();

Callers 5

isInstalledFunction · 0.85
upFunction · 0.85
constructorMethod · 0.85
constructorMethod · 0.85
constructorMethod · 0.85

Calls 2

createInspectorFunction · 0.90
getDatabaseFunction · 0.85

Tested by

no test coverage detected