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

Method upsert

nodedb-columnar/src/pk_index.rs:73–75  ·  view source on GitHub ↗

Insert or overwrite a PK → location mapping (used during compaction remap).

(&mut self, pk_bytes: Vec<u8>, location: RowLocation)

Source from the content-addressed store, hash-verified

71
72 /// Insert or overwrite a PK → location mapping (used during compaction remap).
73 pub fn upsert(&mut self, pk_bytes: Vec<u8>, location: RowLocation) {
74 self.inner.insert(pk_bytes, location);
75 }
76
77 /// Look up a row location by PK.
78 pub fn get(&self, pk_bytes: &[u8]) -> Option<&RowLocation> {

Callers 4

insertMethod · 0.45
insert_with_surrogateMethod · 0.45
insert_if_absentMethod · 0.45

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected