PHP 클래스 Sokil\Mongo\Pipeline\GroupStage

상속: implements Sokil\Mongo\ArrayableInterface
파일 보기 프로젝트 열기: sokil/php-mongo

공개 메소드들

메소드 설명
addToSet ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage Add to set accumulator
avg ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage Average accumulator
first ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage Returns the value that results from applying an expression to the first document in a group of documents that share the same group by key. Only meaningful when documents are in a defined order.
last ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage Returns the value that results from applying an expression to the last document in a group of documents that share the same group by a field.
max ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage Returns the highest value that results from applying an expression to each document in a group of documents that share the same group by key.
min ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage Returns the lowest value that results from applying an expression to each document in a group of documents that share the same group by key.
push ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage Returns an array of all values that result from applying an expression to each document in a group of documents that share the same group by key.
setId ( $id )
sum ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage Sum accumulator
toArray ( )

메소드 상세

addToSet() 공개 메소드

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.
public addToSet ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage
$field string
$expression literal | callable | Sokil\Mongo\Pipeline\Expression Expression
리턴 GroupStage

avg() 공개 메소드

Returns the average value of 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. $avg ignores non-numeric values.
public avg ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage
$field string
$expression literal | callable | Sokil\Mongo\Pipeline\Expression Expression
리턴 GroupStage

first() 공개 메소드

Returns the value that results from applying an expression to the first document in a group of documents that share the same group by key. Only meaningful when documents are in a defined order.
public first ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage
$field string
$expression literal | callable | Sokil\Mongo\Pipeline\Expression Expression
리턴 GroupStage

last() 공개 메소드

Only meaningful when documents are in a defined order.
public last ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage
$field string
$expression literal | callable | Sokil\Mongo\Pipeline\Expression Expression
리턴 GroupStage

max() 공개 메소드

Returns the highest value that results from applying an expression to each document in a group of documents that share the same group by key.
public max ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage
$field string
$expression literal | callable | Sokil\Mongo\Pipeline\Expression Expression
리턴 GroupStage

min() 공개 메소드

Returns the lowest value that results from applying an expression to each document in a group of documents that share the same group by key.
public min ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage
$field string
$expression literal | callable | Sokil\Mongo\Pipeline\Expression Expression
리턴 GroupStage

push() 공개 메소드

Returns an array of all values that result from applying an expression to each document in a group of documents that share the same group by key.
public push ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage
$field string
$expression literal | callable | Sokil\Mongo\Pipeline\Expression Expression
리턴 GroupStage

setId() 공개 메소드

public setId ( $id )

sum() 공개 메소드

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. $sum ignores non-numeric values.
public sum ( string $field, literal | callable | Sokil\Mongo\Pipeline\Expression $expression ) : GroupStage
$field string
$expression literal | callable | Sokil\Mongo\Pipeline\Expression Expression
리턴 GroupStage

toArray() 공개 메소드

public toArray ( )