MCPcopy Create free account
hub / github.com/PerroEngine/Perro / primary_lookup

Method primary_lookup

perro_source/core/perro_csv/src/lib.rs:225–234  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

223 .first()
224 .is_some_and(|cell| cell.hash == key_hash && cell.text == key)
225 })
226 })
227 }
228
229 /// Returns the first row whose cell in `col` has `key_hash`.
230 ///
231 /// Hash-only lookups cannot distinguish collisions. Use [`Self::find`] when the original
232 /// key text is available.
233 pub fn find_hash(&self, col: usize, key_hash: u64) -> Option<&'static CsvRow> {
234 if col == 0 && !self.primary_index.is_empty() {
235 return self.find_primary_hash(key_hash);
236 }
237 self.rows

Callers 1

find_primary_hashMethod · 0.80

Calls 3

reserveMethod · 0.45
lenMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected