MCPcopy Index your code
hub / github.com/TanStack/db / splitOffRightSide

Method splitOffRightSide

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

* Split this node. * Modifies this to remove the second half of the items, returning a separate node containing them.

()

Source from the content-addressed store, hash-verified

850 * Modifies this to remove the second half of the items, returning a separate node containing them.
851 */
852 splitOffRightSide() {
853 // assert !this.isShared;
854 const half = this.children.length >> 1
855 return new BNodeInternal<K, V>(
856 this.children.splice(half),
857 this.keys.splice(half),
858 )
859 }
860
861 takeFromRight(rhs: BNode<K, V>) {
862 // Reminder: parent node must update its copy of key for this node

Callers 1

setMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected