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

Method getDependentFilePaths

src/db/queries.ts:3650–3660  ·  view source on GitHub ↗

* Distinct file paths that DEPEND ON `filePath`: every file containing a * symbol with a cross-file edge (any kind except `contains`) into a symbol * of this file. This is the file-level projection of the symbol dependency * graph and the basis for blast-radius / `affected` test selection.

(filePath: string)

Source from the content-addressed store, hash-verified

3648 * it. One indexed query (idx_nodes_file_path + idx_edges_target_kind).
3649 */
3650 getDependentFilePaths(filePath: string): string[] {
3651 const sql = `SELECT DISTINCT src.file_path AS fp
3652 FROM edges e
3653 JOIN nodes tgt ON tgt.id = e.target
3654 JOIN nodes src ON src.id = e.source
3655 WHERE tgt.file_path = ?
3656 AND e.kind != 'contains'
3657 AND src.file_path != ?`;
3658 const rows = this.db.prepare(sql).all(filePath, filePath) as Array<{ fp: string }>;
3659 return rows.map((r) => r.fp);
3660 }
3661
3662 /**
3663 * Distinct file paths that `filePath` DEPENDS ON — the inverse of

Callers 1

getFileDependentsMethod · 0.80

Calls 3

mapMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected