addToSet() 공개 메소드

AddToSet is an accumulator operation only available in the group stage.
또한 보기: http://docs.mongodb.org/manual/reference/operator/aggregation/addToSet/
public addToSet ( mixed | self $expression )
$expression mixed | self
예제 #1
0
파일: Group.php 프로젝트: Wizkunde/mongodb
 /**
  * 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 http://docs.mongodb.org/manual/reference/operator/aggregation/addToSet/
  * @see Expr::addToSet
  * @param mixed|Expr $expression
  * @return Operator
  */
 public function addToSet($expression)
 {
     $this->expr->addToSet($expression);
     return $this;
 }