* Resolution edges leaving any node of `files` — the candidates when an * importer's bindings may have moved (a Python package's `__init__.py` * edited). The caller narrows them by the names each file binds.
(
language: Language,
files: string[]
)
| 5435 | * edited). The caller narrows them by the names each file binds. |
| 5436 | */ |
| 5437 | getResolutionEdgesFromFiles( |
| 5438 | language: Language, |
| 5439 | files: string[] |
| 5440 | ): Array<Edge & { edgeId: number; sourceFilePath: string; sourceLanguage: Language }> { |
| 5441 | const ids: number[] = []; |
| 5442 | for (let i = 0; i < files.length; i += SQLITE_PARAM_CHUNK_SIZE) { |
| 5443 | const chunk = files.slice(i, i + SQLITE_PARAM_CHUNK_SIZE); |
| 5444 | const rows = this.db |
| 5445 | .prepare( |
| 5446 | `SELECT e.id AS id FROM nodes n CROSS JOIN edges e ON e.source = n.id |
| 5447 | WHERE n.file_path IN (${chunk.map(() => '?').join(',')})` |
| 5448 | ) |
| 5449 | .all(...chunk) as Array<{ id: number }>; |
| 5450 | for (const r of rows) ids.push(r.id); |
| 5451 | } |
| 5452 | return this.loadResolutionEdges(language, ids); |
| 5453 | } |
| 5454 | |
| 5455 | /** |
| 5456 | * Full rows for resolution edges by id, loaded edge-first (CROSS JOIN pins |
no test coverage detected