Function merge

  • Merge a source prolly-tree into target. If a key does not exist in target then it is added from source into target. If both trees have a entry at the same tuple and a choose function was provided, then the entry from the source tree may also be added to target.

    Parameters

    • blockstore: Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>

      target blockstore

    • target: ProllyTree

      Prolly-tree to merge source into

    • source: ProllyTree

      Prolly-tree to merge into target

    • OptionalremoteBlockstore: Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>

      source blockstore

    • Optionalchoose: ((a: Entry, b: Entry) => Entry)

      Chooses between two entries. Must return one of the provided entry instances.

        • (a, b): Entry
        • Parameters

          • a: Entry
          • b: Entry

          Returns Entry

    Returns AsyncIterable<ProllyTreeDiff>