(prefix: string, kind?: string, limit = 50)
| 176 | } |
| 177 | |
| 178 | searchSymbolsByPrefix(prefix: string, kind?: string, limit = 50): Array<SymbolRow & { file_path: string }> { |
| 179 | const pattern = prefix + '%'; |
| 180 | if (kind) { |
| 181 | return this.db.prepare(` |
| 182 | SELECT symbols.*, files.path as file_path |
| 183 | FROM symbols JOIN files ON files.id = symbols.file_id |
| 184 | WHERE symbols.name LIKE ? AND symbols.kind = ? |
| 185 | ORDER BY symbols.name, files.path |
| 186 | LIMIT ? |
| 187 | `).all(pattern, kind, limit) as any[]; |
| 188 | } |
| 189 | return this.db.prepare(` |
| 190 | SELECT symbols.*, files.path as file_path |
| 191 | FROM symbols JOIN files ON files.id = symbols.file_id |
| 192 | WHERE symbols.name LIKE ? |
| 193 | ORDER BY symbols.name, files.path |
| 194 | LIMIT ? |
| 195 | `).all(pattern, limit) as any[]; |
| 196 | } |
| 197 | |
| 198 | listSymbolsInFile(filePath: string): SymbolRow[] { |
| 199 | return this.db.prepare(` |
no outgoing calls
no test coverage detected