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

Method getResolutionEdgesBySourceLanguage

src/db/queries.ts:5464–5483  ·  view source on GitHub ↗

* Every resolution edge leaving a node of `language` — the re-resolution set * when a project-wide input to that language's import resolution changes * (Python package roots). Same exclusion as * getResolutionEdgesByTargetName: synthesized edges carry no refName * stamp and are l

(
    language: Language
  )

Source from the content-addressed store, hash-verified

5462 * stamp and are left alone.
5463 */
5464 getResolutionEdgesBySourceLanguage(
5465 language: Language
5466 ): Array<Edge & { edgeId: number; sourceFilePath: string; sourceLanguage: Language }> {
5467 const rows = this.db
5468 .prepare(
5469 `SELECT e.*, src.file_path AS source_file_path, src.language AS source_language
5470 FROM edges e
5471 JOIN nodes src ON src.id = e.source
5472 WHERE src.language = ?
5473 AND e.kind != 'contains'
5474 AND (e.provenance IS NULL OR e.provenance != 'heuristic')`
5475 )
5476 .all(language) as Array<EdgeRow & { source_file_path: string; source_language: Language }>;
5477 return rows.map((row) => ({
5478 ...rowToEdge(row),
5479 edgeId: row.id,
5480 sourceFilePath: row.source_file_path,
5481 sourceLanguage: row.source_language,
5482 }));
5483 }
5484
5485 /**
5486 * Resolution edges leaving a `language` node whose TARGET is in one of

Calls 4

rowToEdgeFunction · 0.85
mapMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65

Tested by

no test coverage detected