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

Method get

nodedb-query/src/msgpack_scan/index.rs:91–99  ·  view source on GitHub ↗
(&self, field: &str)

Source from the content-addressed store, hash-verified

89 /// Look up a field's byte range.
90 #[inline]
91 pub fn get(&self, field: &str) -> Option<(usize, usize)> {
92 match &self.inner {
93 IndexInner::Flat(entries) => entries
94 .iter()
95 .find(|(k, _, _)| k.as_ref() == field)
96 .map(|(_, s, e)| (*s, *e)),
97 IndexInner::Map(map) => map.get(field).copied(),
98 }
99 }
100
101 /// Number of indexed fields.
102 #[inline]

Callers 15

str_argFunction · 0.45
num_argFunction · 0.45
geom_argFunction · 0.45
matches_metadata_filterFunction · 0.45
columnMethod · 0.45
old_columnMethod · 0.45
excluded_columnMethod · 0.45
aggregate_sliceFunction · 0.45
order_keys_equal_vFunction · 0.45
eval_arg_for_rowFunction · 0.45
row_to_objFunction · 0.45
usize_argFunction · 0.45

Calls 3

findMethod · 0.45
iterMethod · 0.45
as_refMethod · 0.45

Tested by 5

build_and_lookupFunction · 0.36
large_doc_uses_hashmapFunction · 0.36
fuzz_random_payloadsFunction · 0.36