MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / delete_by_surrogate

Method delete_by_surrogate

nodedb-vector/src/collection/lifecycle_insert_ops.rs:113–118  ·  view source on GitHub ↗

Soft-delete a vector by surrogate.

(&mut self, surrogate: Surrogate)

Source from the content-addressed store, hash-verified

111
112 /// Soft-delete a vector by surrogate.
113 pub fn delete_by_surrogate(&mut self, surrogate: Surrogate) -> bool {
114 let Some(global_id) = self.surrogate_to_local.get(&surrogate).copied() else {
115 return false;
116 };
117 self.delete(global_id)
118 }
119
120 /// Un-delete a previously soft-deleted vector (for transaction rollback).
121 pub fn undelete(&mut self, id: u32) -> bool {

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected