MCPcopy Create free account
hub / github.com/couchbase/fleece / get

Method get

Fleece/Tree/HashTree.cc:187–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185 }
186
187 Value HashTree::get(slice key) const {
188 auto root = rootNode();
189 auto leaf = root->findNearest(ComputeHash(key));
190 if (leaf && leaf->keyString() == key)
191 return leaf->value();
192 return nullptr;
193 }
194
195 unsigned HashTree::count() const {
196 return rootNode()->leafCount();

Callers

nothing calls this directly

Calls 4

ComputeHashFunction · 0.85
findNearestMethod · 0.45
keyStringMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected