MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / idsWhere

Method idsWhere

src/db/queries.ts:5502–5510  ·  view source on GitHub ↗
(column: 'source' | 'target', nodeIds: string[])

Source from the content-addressed store, hash-verified

5500 // rename took 18 s).
5501 const candidates = new Set<number>();
5502 const idsWhere = (column: 'source' | 'target', nodeIds: string[]): void => {
5503 for (let i = 0; i < nodeIds.length; i += SQLITE_PARAM_CHUNK_SIZE) {
5504 const chunk = nodeIds.slice(i, i + SQLITE_PARAM_CHUNK_SIZE);
5505 const rows = this.db
5506 .prepare(`SELECT id FROM edges WHERE ${column} IN (${chunk.map(() => '?').join(',')})`)
5507 .all(...chunk) as Array<{ id: number }>;
5508 for (const r of rows) candidates.add(r.id);
5509 }
5510 };
5511 // Edges into the affected module files.
5512 for (let i = 0; i < targetFiles.length; i += SQLITE_PARAM_CHUNK_SIZE) {
5513 const chunk = targetFiles.slice(i, i + SQLITE_PARAM_CHUNK_SIZE);

Callers

nothing calls this directly

Calls 5

mapMethod · 0.80
allMethod · 0.65
prepareMethod · 0.65
joinMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected