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

Method insertUnresolvedRef

src/db/queries.ts:4360–4378  ·  view source on GitHub ↗

* Insert an unresolved reference

(ref: UnresolvedReference)

Source from the content-addressed store, hash-verified

4358 * Insert an unresolved reference
4359 */
4360 insertUnresolvedRef(ref: UnresolvedReference): void {
4361 if (!this.stmts.insertUnresolved) {
4362 this.stmts.insertUnresolved = this.db.prepare(`
4363 INSERT INTO unresolved_refs (from_node_id, reference_name, reference_kind, line, col, candidates, file_path, language)
4364 VALUES (@fromNodeId, @referenceName, @referenceKind, @line, @col, @candidates, @filePath, @language)
4365 `);
4366 }
4367
4368 this.stmts.insertUnresolved.run({
4369 fromNodeId: ref.fromNodeId,
4370 referenceName: ref.referenceName,
4371 referenceKind: ref.referenceKind,
4372 line: ref.line,
4373 col: ref.column,
4374 candidates: ref.candidates ? JSON.stringify(ref.candidates) : null,
4375 filePath: ref.filePath ?? '',
4376 language: ref.language ?? 'unknown',
4377 });
4378 }
4379
4380 /**
4381 * 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