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

Method getParsedFileCounts

src/db/queries.ts:5802–5816  ·  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

5800 * getStats() either way, because every explore runs that.
5801 */
5802 getParsedFileCounts(): Array<{ language: Language; files: number; parsed: number }> {
5803 return this.db
5804 .prepare(`
5805 SELECT f.language AS language, COUNT(*) AS files,
5806 SUM(CASE
5807 WHEN f.node_count > 1 THEN 1
5808 WHEN EXISTS (SELECT 1 FROM nodes n WHERE n.file_path = f.path AND n.kind <> 'file') THEN 1
5809 ELSE 0
5810 END) AS parsed
5811 FROM files f
5812 GROUP BY f.language
5813 ORDER BY f.language
5814 `)
5815 .all() as Array<{ language: Language; files: number; parsed: number }>;
5816 }
5817
5818 /**
5819 * Get graph statistics

Callers 1

getLanguageCoverageMethod · 0.80

Calls 2

allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected