more indexing fixes

This commit is contained in:
Test 2024-08-27 12:25:53 -07:00
parent b7ca371d57
commit 65ffdde112
2 changed files with 2 additions and 2 deletions

View file

@ -240,7 +240,7 @@ export class CodeSnippetsCodebaseIndex implements CodebaseIndex {
for (let i = 0; i < results.removeTag.length; i++) {
const removeTag = results.removeTag[i];
const snippets = await db.get(
let snippets = await db.get(
`SELECT id FROM code_snippets
WHERE cacheKey = ? AND path = ?`,
[removeTag.cacheKey, removeTag.path],

View file

@ -226,7 +226,7 @@ async function getAddRemoveForTag(
break;
case AddRemoveResultType.Add:
await db.run(
"INSERT INTO tag_catalog (path, cacheKey, lastUpdated, dir, branch, artifactId) VALUES (?, ?, ?, ?, ?, ?)",
"REPLACE INTO tag_catalog (path, cacheKey, lastUpdated, dir, branch, artifactId) VALUES (?, ?, ?, ?, ?, ?)",
path,
cacheKey,
newLastUpdatedTimestamp,