(name: string, kind?: string, limit = 50)
| 157 | } |
| 158 | |
| 159 | findSymbolsByName(name: string, kind?: string, limit = 50): Array<SymbolRow & { file_path: string }> { |
| 160 | if (kind) { |
| 161 | return this.db.prepare(` |
| 162 | SELECT symbols.*, files.path as file_path |
| 163 | FROM symbols JOIN files ON files.id = symbols.file_id |
| 164 | WHERE symbols.name = ? AND symbols.kind = ? |
| 165 | ORDER BY files.path |
| 166 | LIMIT ? |
| 167 | `).all(name, kind, limit) as any[]; |
| 168 | } |
| 169 | return this.db.prepare(` |
| 170 | SELECT symbols.*, files.path as file_path |
| 171 | FROM symbols JOIN files ON files.id = symbols.file_id |
| 172 | WHERE symbols.name = ? |
| 173 | ORDER BY files.path |
| 174 | LIMIT ? |
| 175 | `).all(name, limit) as any[]; |
| 176 | } |
| 177 | |
| 178 | searchSymbolsByPrefix(prefix: string, kind?: string, limit = 50): Array<SymbolRow & { file_path: string }> { |
| 179 | const pattern = prefix + '%'; |
no outgoing calls
no test coverage detected