union method

Pipeline union(
  1. Pipeline other, {
  2. Map<String, Object?>? rawOptions,
})

Appends the results of other to the results of this pipeline. The order of the combined results is not defined.

Implementation

Pipeline union(Pipeline other, {Map<String, Object?>? rawOptions}) {
  return _append(
    Stage(
      'union',
      args: <pb.Value Function(PipelineEncoder)>[
        (PipelineEncoder encoder) =>
            pb.Value()..pipelineValue = other.toProto(encoder),
      ],
      rawOptions: rawOptions,
    ),
  );
}