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

Method _find_leaf_for_key

python/bplustree/bplus_tree.py:480–482  ·  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

478 start_index = 0
479
480 def _find_leaf_for_key(self, key: Any) -> Optional["LeafNode"]:
481 """Find the leaf node that contains or would contain the given key"""
482 return self.root.find_leaf_for_key(key)
483
484 def _find_position_in_leaf(self, leaf: "LeafNode", key: Any) -> int:
485 """Find the position where key is or would be in the leaf"""

Callers 1

itemsMethod · 0.95

Calls 1

find_leaf_for_keyMethod · 0.45

Tested by

no test coverage detected