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

Method merge_with_right

python/bplustree/bplus_tree.py:727–734  ·  view source on GitHub ↗

Merge this leaf with its right sibling

(self, right_sibling: "LeafNode")

Source from the content-addressed store, hash-verified

725 self.values.append(value)
726
727 def merge_with_right(self, right_sibling: "LeafNode") -> None:
728 """Merge this leaf with its right sibling"""
729 # Move all keys and values from right sibling to this node
730 self.keys.extend(right_sibling.keys)
731 self.values.extend(right_sibling.values)
732
733 # Update linked list to skip the right sibling
734 self.next = right_sibling.next
735
736 def find_position(self, key: Any) -> Tuple[int, bool]:
737 """

Callers 2

_merge_with_siblingMethod · 0.45

Calls

no outgoing calls

Tested by 1