Example #1
0
 /**
  * Returns an array of all unique values that results from applying an
  * expression to each document in a group of documents that share the same
  * group by key. Order of the elements in the output array is unspecified.
  *
  * AddToSet is an accumulator operation only available in the group stage.
  *
  * @see Expr::addToSet
  * @param mixed|Expr $expression
  * @return Operator
  */
 public function addToSet($expression)
 {
     $this->expr->addToSet($expression);
     return $this;
 }