MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / searchSymbolsByPrefix

Method searchSymbolsByPrefix

src/codegraph/schema.ts:178–196  ·  view source on GitHub ↗
(prefix: string, kind?: string, limit = 50)

Source from the content-addressed store, hash-verified

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(`

Callers 4

codegraph.test.tsFile · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected