MCPcopy Create free account
hub / github.com/TanStack/db / takeFromLeft

Method takeFromLeft

packages/db/src/utils/btree.ts:869–875  ·  view source on GitHub ↗
(lhs: BNode<K, V>)

Source from the content-addressed store, hash-verified

867 }
868
869 takeFromLeft(lhs: BNode<K, V>) {
870 // Reminder: parent node must update its copy of key for this node
871 // assert: neither node is shared
872 // assert rhs.keys.length > (maxNodeSize/2 && this.keys.length<maxNodeSize)
873 this.keys.unshift(lhs.keys.pop()!)
874 this.children.unshift((lhs as BNodeInternal<K, V>).children.pop()!)
875 }
876
877 // ///////////////////////////////////////////////////////////////////////////
878 // Internal Node: scanning & deletions //////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected