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

Method idsWhere

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

Source from the content-addressed store, hash-verified

5389 // rename took 18 s).
5390 const candidates = new Set<number>();
5391 const idsWhere = (column: 'source' | 'target', nodeIds: string[]): void => {
5392 for (let i = 0; i < nodeIds.length; i += SQLITE_PARAM_CHUNK_SIZE) {
5393 const chunk = nodeIds.slice(i, i + SQLITE_PARAM_CHUNK_SIZE);
5394 const rows = this.db
5395 .prepare(`SELECT id FROM edges WHERE ${column} IN (${chunk.map(() => '?').join(',')})`)
5396 .all(...chunk) as Array<{ id: number }>;
5397 for (const r of rows) candidates.add(r.id);
5398 }
5399 };
5400 // Edges into the affected module files.
5401 for (let i = 0; i < targetFiles.length; i += SQLITE_PARAM_CHUNK_SIZE) {
5402 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