* 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[])
| 5791 | * what a file defines. |
| 5792 | */ |
| 5793 | getPythonFilesWithEdgesInto(filePath: string, kinds: string[], targetKinds: string[]): string[] { |
| 5794 | const kp = kinds.map(() => '?').join(','); |
| 5795 | const tp = targetKinds.map(() => '?').join(','); |
| 5796 | return (this.db |
| 5797 | .prepare( |
| 5798 | `SELECT DISTINCT src.file_path AS file_path |
| 5799 | FROM edges e |
| 5800 | JOIN nodes tgt ON tgt.id = e.target |
| 5801 | JOIN nodes src ON src.id = e.source |
| 5802 | WHERE tgt.file_path = ? AND e.kind IN (${kp}) AND tgt.kind IN (${tp}) |
| 5803 | AND src.language = 'python' AND src.file_path != ?` |
| 5804 | ) |
| 5805 | .all(filePath, ...kinds, ...targetKinds, filePath) as Array<{ file_path: string }>).map((r) => r.file_path); |
| 5806 | } |
| 5807 | |
| 5808 | replaceResolutionEdgesWithUnresolvedRefs( |
| 5809 | edgeIds: number[], |
no test coverage detected