Extract all keys from B+ tree by traversing leaves
(self)
| 172 | return False |
| 173 | |
| 174 | def _get_all_btree_keys(self) -> List[Any]: |
| 175 | """Extract all keys from B+ tree by traversing leaves""" |
| 176 | keys = [] |
| 177 | current = self.btree.leaves |
| 178 | while current is not None: |
| 179 | keys.extend(current.keys) |
| 180 | current = current.next |
| 181 | return keys |
| 182 | |
| 183 | def random_key(self, existing_bias: float = 0.7) -> Any: |
| 184 | """Generate a random key, biased towards existing keys for deletions/updates""" |