MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / countGeneratedFiles

Method countGeneratedFiles

src/db/queries.ts:4666–4673  ·  view source on GitHub ↗

How many indexed files carry the generated flag. Surfaced by `status`.

()

Source from the content-addressed store, hash-verified

4664
4665 /** How many indexed files carry the generated flag. Surfaced by `status`. */
4666 countGeneratedFiles(): number {
4667 // Before schema v9 no file carries the flag (#2913).
4668 if (!this.hasSchema('files', 'generated')) return 0;
4669 const row = this.db
4670 .prepare('SELECT COUNT(*) AS n FROM files WHERE generated = 1')
4671 .get() as { n: number } | undefined;
4672 return row?.n ?? 0;
4673 }
4674
4675 /**
4676 * Delete a file record and its nodes

Calls 3

hasSchemaMethod · 0.95
getMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected