* The `signature` of each top-level node of these kinds and languages whose * text holds one of `names`. A sync asks this about the definitions it changed, * so no node is built and nothing is sorted; `names` is the caller's to keep short.
(kinds: readonly NodeKind[], languages: readonly string[], names: readonly string[])
| 1673 | * so no node is built and nothing is sorted; `names` is the caller's to keep short. |
| 1674 | */ |
| 1675 | getTopLevelSignaturesMentioning(kinds: readonly NodeKind[], languages: readonly string[], names: readonly string[]): string[] { |
| 1676 | const marks = (n: number): string => new Array(n).fill('?').join(', '); |
| 1677 | const rows = this.db.prepare( |
| 1678 | `SELECT signature FROM nodes WHERE kind IN (${marks(kinds.length)}) AND language IN (${marks(languages.length)}) |
| 1679 | AND qualified_name = name AND (${names.map(() => 'instr(signature, ?) > 0').join(' OR ')})` |
| 1680 | ).all(...kinds, ...languages, ...names) as Array<{ signature: string }>; |
| 1681 | return rows.map((row) => row.signature); |
| 1682 | } |
| 1683 | |
| 1684 | /** |
| 1685 | * Get all nodes in the database |
no test coverage detected