MCPcopy Create free account
hub / github.com/amit-davidson/Building-a-NoSQL-database-from-zero / Remove

Method Remove

Part 7/collection.go:154–208  ·  view source on GitHub ↗

Remove removes a key from the tree. It finds the correct node and the index to remove the item from and removes it. When performing the search, the ancestors are returned as well. This way we can iterate over them to check which nodes were modified and rebalance by rotating or merging the unbalanced

(key []byte)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

DeleteCollectionMethod · 0.45

Calls 8

getNodesMethod · 0.95
getNodeMethod · 0.45
findKeyMethod · 0.45
isLeafMethod · 0.45
removeItemFromLeafMethod · 0.45
isUnderPopulatedMethod · 0.45
rebalanceRemoveMethod · 0.45

Tested by

no test coverage detected