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

Method insertUnresolvedRef

src/db/queries.ts:4471–4489  ·  view source on GitHub ↗

* Insert an unresolved reference

(ref: UnresolvedReference)

Source from the content-addressed store, hash-verified

4469 * Insert an unresolved reference
4470 */
4471 insertUnresolvedRef(ref: UnresolvedReference): void {
4472 if (!this.stmts.insertUnresolved) {
4473 this.stmts.insertUnresolved = this.db.prepare(`
4474 INSERT INTO unresolved_refs (from_node_id, reference_name, reference_kind, line, col, candidates, file_path, language)
4475 VALUES (@fromNodeId, @referenceName, @referenceKind, @line, @col, @candidates, @filePath, @language)
4476 `);
4477 }
4478
4479 this.stmts.insertUnresolved.run({
4480 fromNodeId: ref.fromNodeId,
4481 referenceName: ref.referenceName,
4482 referenceKind: ref.referenceKind,
4483 line: ref.line,
4484 col: ref.column,
4485 candidates: ref.candidates ? JSON.stringify(ref.candidates) : null,
4486 filePath: ref.filePath ?? '',
4487 language: ref.language ?? 'unknown',
4488 });
4489 }
4490
4491 /**
4492 * Insert multiple unresolved references in a transaction

Callers 9

fixtureFunction · 0.95
fixtureFunction · 0.95
fixtureFunction · 0.95
fixtureFunction · 0.95
fixtureFunction · 0.95
cli-sync.test.tsFile · 0.80
failedFunction · 0.80
sync.test.tsFile · 0.80

Calls 2

prepareMethod · 0.65
runMethod · 0.65

Tested by 6

fixtureFunction · 0.76
fixtureFunction · 0.76
fixtureFunction · 0.76
fixtureFunction · 0.76
fixtureFunction · 0.76
failedFunction · 0.64