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

Method markReferencesFailedByRowIds

src/db/queries.ts:2319–2332  ·  view source on GitHub ↗

* Park refs as status='failed' by row id — the precise counterpart of * markReferencesFailed, for the same reason as deleteReferencesByRowIds: * the key-tuple variant also flips same-key sibling rows in later batches * to 'failed' before they were ever attempted (#1269). Resolution outcome

(refs: Array<{ rowId: number; referenceName: string }>)

Source from the content-addressed store, hash-verified

2317 * so a sibling must not inherit this row's failure.
2318 */
2319 markReferencesFailedByRowIds(refs: Array<{ rowId: number; referenceName: string }>): number {
2320 if (refs.length === 0) return 0;
2321 const stmt = this.db.prepare(
2322 "UPDATE unresolved_refs SET status = 'failed', name_tail = ? WHERE id = ?"
2323 );
2324 let changed = 0;
2325 const markMany = this.db.transaction((items: typeof refs) => {
2326 for (const ref of items) {
2327 changed += stmt.run(referenceNameTail(ref.referenceName), ref.rowId).changes;
2328 }
2329 });
2330 markMany(refs);
2331 return changed;
2332 }
2333
2334 /**
2335 * Failed refs whose name tail matches one of the given symbol names — the

Callers 3

resolveAndPersistMethod · 0.80

Calls 4

referenceNameTailFunction · 0.85
prepareMethod · 0.65
transactionMethod · 0.65
runMethod · 0.65

Tested by

no test coverage detected