MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / removeVectorItems

Function removeVectorItems

vector/idbStore.js:118–126  ·  view source on GitHub ↗
(db, collection, ids)

Source from the content-addressed store, hash-verified

116}
117
118export 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
128export async function clearVectorItems(db, collection) {
129 const tx = db.transaction([ITEMS_STORE], 'readwrite');

Callers 2

removeMethod · 0.90
removeMethod · 0.90

Calls 3

toIdFunction · 0.90
vectorKeyFunction · 0.85
transactionToPromiseFunction · 0.85

Tested by

no test coverage detected