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

Function seedPendingRefs

__tests__/wal-deferral.test.ts:311–322  ·  view source on GitHub ↗
(cg: CodeGraph)

Source from the content-addressed store, hash-verified

309 // at the pool-idle boundary and (b) actually parks on a returned promise.
310
311 async function seedPendingRefs(cg: CodeGraph): Promise<void> {
312 const raw = (cg as unknown as { db: DatabaseConnection }).db.getDb();
313 const node = raw.prepare("SELECT id, file_path FROM nodes WHERE kind = 'function' LIMIT 1").get() as
314 | { id: string; file_path: string }
315 | undefined;
316 expect(node).toBeDefined();
317 const ins = raw.prepare(
318 "INSERT INTO unresolved_refs (from_node_id, reference_name, reference_kind, line, col, file_path, language, status) VALUES (?, ?, 'calls', 1, 0, ?, 'typescript', 'pending')"
319 );
320 ins.run(node!.id, 'helper0', node!.file_path);
321 ins.run(node!.id, 'helper1', node!.file_path);
322 }
323
324 it('calls the backpressure hook once per settled batch', async () => {
325 writeFixtureProject();

Callers 1

Calls 4

getDbMethod · 0.80
getMethod · 0.65
prepareMethod · 0.65
runMethod · 0.65

Tested by

no test coverage detected