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

Method mergeSibling

packages/db/src/utils/btree.ts:681–688  ·  view source on GitHub ↗

Adds entire contents of right-hand sibling (rhs is left unchanged)

(rhs: BNode<K, V>, _: number)

Source from the content-addressed store, hash-verified

679
680 /** Adds entire contents of right-hand sibling (rhs is left unchanged) */
681 mergeSibling(rhs: BNode<K, V>, _: number) {
682 this.keys.push.apply(this.keys, rhs.keys)
683 if (this.values === undefVals) {
684 if (rhs.values === undefVals) return
685 this.values = this.values.slice(0, this.keys.length)
686 }
687 this.values.push.apply(this.values, rhs.reifyValues())
688 }
689}
690
691/** Internal node (non-leaf node) ********************************************/

Callers 1

tryMergeMethod · 0.45

Calls 1

reifyValuesMethod · 0.80

Tested by

no test coverage detected