prollipop
    Preparing search index...

    Function rebuildLevel

    • s Rebuilds a level of the tree.

      Only yields diffs when the level is changed. Entry diffs are only yielded on level 0. Writes to the state.removedBuckets array if a level 0 bucket is changed/removed/added. Writes to the state.newRoot if a new root is found. A new root is found when the tail and head buckets were changed and only one bucket was rebuilt for the level.

      Parameters

      • cursor: Cursor

        The cursor to the current tree.

      • updts: Updts

        The state of the updates for the tree.

      • state: State

        The state of the mutation.

      • average: number

        The average number of entries per bucket.

      • level: number

        The level to be rebuilt.

      Returns AsyncIterable<ProllyTreeDiff>