@loghead/core 0.1.31 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -90,9 +90,8 @@ class DbService {
90
90
  }
91
91
  const vectorJson = JSON.stringify(embedding);
92
92
  // Explicitly cast rowid to BigInt to ensure better-sqlite3 binds it as an INTEGER
93
- // Ensure no orphaned vector exists for this rowid (can happen if logs were deleted but vec_logs weren't)
94
- client_1.db.prepare("DELETE FROM vec_logs WHERE rowid = ?").run(BigInt(rowid));
95
- client_1.db.prepare("INSERT INTO vec_logs(rowid, embedding) VALUES (?, ?)").run(BigInt(rowid), vectorJson);
93
+ // Use REPLACE INTO to handle potential collisions gracefully
94
+ client_1.db.prepare("REPLACE INTO vec_logs(rowid, embedding) VALUES (?, ?)").run(BigInt(rowid), vectorJson);
96
95
  }
97
96
  });
98
97
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loghead/core",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "license": "MIT",
5
5
  "description": "Core API and Database for Loghead",
6
6
  "repository": {