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

Method undelete

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

Un-delete a previously soft-deleted vector (for transaction rollback).

(&mut self, id: u32)

Source from the content-addressed store, hash-verified

119
120 /// Un-delete a previously soft-deleted vector (for transaction rollback).
121 pub fn undelete(&mut self, id: u32) -> bool {
122 for seg in &mut self.sealed {
123 if id >= seg.base_id {
124 let local = id - seg.base_id;
125 if (local as usize) < seg.index.len() {
126 return seg.index.undelete(local);
127 }
128 }
129 }
130 false
131 }
132}

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected