MergeObjects class

$mergeObjects operator

Combines multiple documents into a single document.

  • When used as a $group stage accumulator, $mergeObjects has the following form:
{ $mergeObjects: <document> }
  • When used in other expressions, including in the $group stage but not as an accumulator:
{ $mergeObjects: [ <document1>, <document2>, ... ] }

The can be any valid expression that resolves to a document.

Inheritance

Constructors

MergeObjects(dynamic objects)
Creates $mergeObjects operator expression

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

build() Map<String, dynamic>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited