fix: REPLACE INTO code_snippet table
This commit is contained in:
parent
e61c2e9e36
commit
bdb967d7b3
1 changed files with 2 additions and 2 deletions
|
|
@ -201,7 +201,7 @@ export class CodeSnippetsCodebaseIndex implements CodebaseIndex {
|
|||
|
||||
for (const snippet of snippets) {
|
||||
const { lastID } = await db.run(
|
||||
"INSERT INTO code_snippets (path, cacheKey, content, title, startLine, endLine) VALUES (?, ?, ?, ?, ?, ?)",
|
||||
"REPLACE INTO code_snippets (path, cacheKey, content, title, startLine, endLine) VALUES (?, ?, ?, ?, ?, ?)",
|
||||
[
|
||||
addTag.path,
|
||||
addTag.cacheKey,
|
||||
|
|
@ -212,7 +212,7 @@ export class CodeSnippetsCodebaseIndex implements CodebaseIndex {
|
|||
],
|
||||
);
|
||||
await db.run(
|
||||
"INSERT INTO code_snippets_tags (snippetId, tag) VALUES (?, ?)",
|
||||
"REPLACE INTO code_snippets_tags (snippetId, tag) VALUES (?, ?)",
|
||||
[lastID, tagString],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue