* The python files with an edge of one of `kinds` into a node of `filePath` * whose kind is one of `targetKinds` — who subclasses, calls or constructs * what a file defines.
(filePath: string, kinds: string[], targetKinds: string[])
| 5680 | * what a file defines. |
| 5681 | */ |
| 5682 | getPythonFilesWithEdgesInto(filePath: string, kinds: string[], targetKinds: string[]): string[] { |
| 5683 | const kp = kinds.map(() => '?').join(','); |
| 5684 | const tp = targetKinds.map(() => '?').join(','); |
| 5685 | return (this.db |
| 5686 | .prepare( |
| 5687 | `SELECT DISTINCT src.file_path AS file_path |
| 5688 | FROM edges e |
| 5689 | JOIN nodes tgt ON tgt.id = e.target |
| 5690 | JOIN nodes src ON src.id = e.source |
| 5691 | WHERE tgt.file_path = ? AND e.kind IN (${kp}) AND tgt.kind IN (${tp}) |
| 5692 | AND src.language = 'python' AND src.file_path != ?` |
| 5693 | ) |
| 5694 | .all(filePath, ...kinds, ...targetKinds, filePath) as Array<{ file_path: string }>).map((r) => r.file_path); |
| 5695 | } |
| 5696 | |
| 5697 | replaceResolutionEdgesWithUnresolvedRefs( |
| 5698 | edgeIds: number[], |
no test coverage detected