(db, collection, ids)
| 116 | } |
| 117 | |
| 118 | export async function removeVectorItems(db, collection, ids) { |
| 119 | const tx = db.transaction([ITEMS_STORE], 'readwrite'); |
| 120 | const store = tx.objectStore(ITEMS_STORE); |
| 121 | for (const idValue of ids) { |
| 122 | const id = toId(idValue); |
| 123 | store.delete(vectorKey(collection, id)); |
| 124 | } |
| 125 | await transactionToPromise(tx); |
| 126 | } |
| 127 | |
| 128 | export async function clearVectorItems(db, collection) { |
| 129 | const tx = db.transaction([ITEMS_STORE], 'readwrite'); |
no test coverage detected