* 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[])
| 1671 | * so no node is built and nothing is sorted; `names` is the caller's to keep short. |
| 1672 | */ |
| 1673 | getTopLevelSignaturesMentioning(kinds: readonly NodeKind[], languages: readonly string[], names: readonly string[]): string[] { |
| 1674 | const marks = (n: number): string => new Array(n).fill('?').join(', '); |
| 1675 | const rows = this.db.prepare( |
| 1676 | `SELECT signature FROM nodes WHERE kind IN (${marks(kinds.length)}) AND language IN (${marks(languages.length)}) |
| 1677 | AND qualified_name = name AND (${names.map(() => 'instr(signature, ?) > 0').join(' OR ')})` |
| 1678 | ).all(...kinds, ...languages, ...names) as Array<{ signature: string }>; |
| 1679 | return rows.map((row) => row.signature); |
| 1680 | } |
| 1681 | |
| 1682 | /** |
| 1683 | * Get all nodes in the database |
no test coverage detected