MCPcopy Create free account
hub / github.com/InfinitiBit/graphbit / delete_all

Method delete_all

core/src/memory/service.rs:175–182  ·  view source on GitHub ↗

Delete all memories matching a scope.

(&self, scope: &MemoryScope)

Source from the content-addressed store, hash-verified

173
174 /// Delete all memories matching a scope.
175 pub async fn delete_all(&self, scope: &MemoryScope) -> GraphBitResult<()> {
176 // Remove from vector index first.
177 let memories = self.store.get_all_memories(scope).await?;
178 for m in &memories {
179 self.vector_index.remove(&m.id).await;
180 }
181 self.store.delete_all_memories(scope).await
182 }
183
184 /// Get the mutation history for a memory.
185 pub async fn history(&self, memory_id: &MemoryId) -> GraphBitResult<Vec<MemoryHistory>> {

Callers

nothing calls this directly

Calls 3

get_all_memoriesMethod · 0.80
removeMethod · 0.80
delete_all_memoriesMethod · 0.80

Tested by

no test coverage detected