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

Method getParsedFileCounts

src/db/queries.ts:6253–6267  ·  view source on GitHub ↗

* For each language, how many files it has and how many yielded a symbol: a * node other than the file's own. More than one stored node settles a row, so * `nodes` is only probed for the few it can't, such as a file whose one symbol * came from a framework pass. Probing every row costs as m

()

Source from the content-addressed store, hash-verified

6251 * getStats() either way, because every explore runs that.
6252 */
6253 getParsedFileCounts(): Array<{ language: Language; files: number; parsed: number }> {
6254 return this.db
6255 .prepare(`
6256 SELECT f.language AS language, COUNT(*) AS files,
6257 SUM(CASE
6258 WHEN f.node_count > 1 THEN 1
6259 WHEN EXISTS (SELECT 1 FROM nodes n WHERE n.file_path = f.path AND n.kind <> 'file') THEN 1
6260 ELSE 0
6261 END) AS parsed
6262 FROM files f
6263 GROUP BY f.language
6264 ORDER BY f.language
6265 `)
6266 .all() as Array<{ language: Language; files: number; parsed: number }>;
6267 }
6268
6269 /**
6270 * Get graph statistics

Callers 1

getLanguageCoverageMethod · 0.80

Calls 2

allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected