MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / queryRows

Function queryRows

graph-ui/src/traces/bug-paths.test.ts:73–101  ·  view source on GitHub ↗
(project, query)

Source from the content-addressed store, hash-verified

71 return {
72 queries,
73 async queryRows(project, query) {
74 expect(project).toBe(PROJECT);
75 queries.push(query);
76 const incoming = /b\.qualified_name = "([^"]+)"/.exec(query);
77 if (incoming !== null) {
78 return (CALLERS[incoming[1]] ?? []).map((caller) => ({
79 [COLUMNS.callsIn[0]]: caller.name,
80 [COLUMNS.callsIn[1]]: caller.qualifiedName,
81 [COLUMNS.callsIn[2]]: caller.filePath,
82 [COLUMNS.callsIn[3]]: String(caller.line),
83 [COLUMNS.callsIn[4]]: 'false',
84 [COLUMNS.callsIn[5]]: '1',
85 }));
86 }
87 if (query.includes('MATCH (n:Function)') || query.includes('MATCH (n:Method)')) {
88 const wanted = [...query.matchAll(/n\.file_path = "([^"]+)"/g)].map((match) => match[1]);
89 return DECLARATIONS
90 .filter((entry) => wanted.includes(entry.filePath) && query.includes('(n:Function)'))
91 .map((entry) => ({
92 [COLUMNS.declarations[0]]: entry.name,
93 [COLUMNS.declarations[1]]: entry.qualifiedName,
94 [COLUMNS.declarations[2]]: entry.filePath,
95 [COLUMNS.declarations[3]]: String(entry.line),
96 [COLUMNS.declarations[4]]: String(entry.line + 4),
97 [COLUMNS.declarations[5]]: 'false',
98 }));
99 }
100 return [];
101 },
102 };
103}
104

Callers

nothing calls this directly

Calls 5

expectFunction · 0.85
fakeIndexFunction · 0.85
rowFunction · 0.70
queryRowsMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected