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

Method takeFromRight

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

Source from the content-addressed store, hash-verified

859 }
860
861 takeFromRight(rhs: BNode<K, V>) {
862 // Reminder: parent node must update its copy of key for this node
863 // assert: neither node is shared
864 // assert rhs.keys.length > (maxNodeSize/2 && this.keys.length<maxNodeSize)
865 this.keys.push(rhs.keys.shift()!)
866 this.children.push((rhs as BNodeInternal<K, V>).children.shift()!)
867 }
868
869 takeFromLeft(lhs: BNode<K, V>) {
870 // Reminder: parent node must update its copy of key for this node

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected