* 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[]
)
| 5546 | * edited). The caller narrows them by the names each file binds. |
| 5547 | */ |
| 5548 | getResolutionEdgesFromFiles( |
| 5549 | language: Language, |
| 5550 | files: string[] |
| 5551 | ): Array<Edge & { edgeId: number; sourceFilePath: string; sourceLanguage: Language }> { |
| 5552 | const ids: number[] = []; |
| 5553 | for (let i = 0; i < files.length; i += SQLITE_PARAM_CHUNK_SIZE) { |
| 5554 | const chunk = files.slice(i, i + SQLITE_PARAM_CHUNK_SIZE); |
| 5555 | const rows = this.db |
| 5556 | .prepare( |
| 5557 | `SELECT e.id AS id FROM nodes n CROSS JOIN edges e ON e.source = n.id |
| 5558 | WHERE n.file_path IN (${chunk.map(() => '?').join(',')})` |
| 5559 | ) |
| 5560 | .all(...chunk) as Array<{ id: number }>; |
| 5561 | for (const r of rows) ids.push(r.id); |
| 5562 | } |
| 5563 | return this.loadResolutionEdges(language, ids); |
| 5564 | } |
| 5565 | |
| 5566 | /** |
| 5567 | * Full rows for resolution edges by id, loaded edge-first (CROSS JOIN pins |
no test coverage detected