예제 #1
0
파일: Group.php 프로젝트: cosmow/riak
 /**
  * Calculates and returns the sum of all the numeric values that result from
  * applying a specified expression to each document in a group of documents
  * that share the same group by key. Ignores nun-numeric values.
  *
  * @return Operator
  */
 public function sum($expression)
 {
     $this->expr->sum($expression);
     return $this;
 }
예제 #2
0
파일: Operator.php 프로젝트: cosmow/riak
 /**
  * Returns the year portion of a date.
  *
  * The argument can be any expression as long as it resolves to a date.
  *
  * @see http://docs.mongodb.org/manual/reference/operator/aggregation/year/
  * @see Expr::year
  * @param mixed|Expr $expression
  * @return self
  */
 public function year($expression)
 {
     $this->expr->year($expression);
     return $this;
 }