addWrites method

CompoundWrite addWrites(
  1. Path path,
  2. CompoundWrite updates
)

This write with every write of updates (one update) added below path, in the server's two passes (see apply): the values first, then the priorities, parents first.

Implementation

CompoundWrite addWrites(Path path, CompoundWrite updates) {
  CompoundWrite result = this;
  for (final MapEntry<Path, Node> write in writesInServerOrder(updates)) {
    result = result.addWrite(path.childPath(write.key), write.value);
  }
  return result;
}