MCPcopy Create free account
hub / github.com/KentBeck/BPlusTree3 / find_leaf_for_key

Method find_leaf_for_key

python/bplustree/bplus_tree.py:812–814  ·  view source on GitHub ↗

Find the leaf node that contains or would contain the given key

(self, _key: Any)

Source from the content-addressed store, hash-verified

810 return new_leaf, new_leaf.keys[0]
811
812 def find_leaf_for_key(self, _key: Any) -> "LeafNode":
813 """Find the leaf node that contains or would contain the given key"""
814 return self # Leaf nodes return themselves
815
816 def key_count(self) -> int:
817 """Count all keys in this leaf and all following leaves"""

Callers 2

_find_leaf_for_keyMethod · 0.45
find_leaf_for_keyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected