PHP 클래스 Sokil\Mongo\Pipeline

상속: implements Sokil\Mongo\ArrayableInterface, implements JsonSerializable
파일 보기 프로젝트 열기: sokil/php-mongo 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Collection $collection )
__toString ( )
aggregate ( array $options = [] )
aggregateCursor ( array $options = [] )
allowDiskUse ( $allow = true )
explain ( $allow = true )
getOptions ( )
group ( array | callable $stage ) : Pipeline Groups documents by some specified expression and outputs to the next stage a document for each distinct grouping. The output documents contain an _id field which contains the distinct group by key. The output documents can also contain computed fields that hold the values of some accumulator expression grouped by the $group‘s _id field. $group does not order its output documents.
jsonSerialize ( )
limit ( $limit )
match ( array | Expression $expression ) : Pipeline Filter documents by expression
project ( array $pipeline ) : Pipeline Passes along the documents with only the specified fields to the next stage in the pipeline. The specified fields can be existing fields from the input documents or newly computed fields.
setBatchSize ( $batchSize )
skip ( $skip )
sort ( array $sortFields )
toArray ( )
unwind ( string $path ) : Pipeline Deconstructs an array field from the input documents to output a document for each element.

비공개 메소드들

메소드 설명
addStage ( string $operator, mixed $stage )

메소드 상세

__construct() 공개 메소드

public __construct ( Collection $collection )
$collection Collection

__toString() 공개 메소드

public __toString ( )

aggregate() 공개 메소드

public aggregate ( array $options = [] )
$options array

aggregateCursor() 공개 메소드

public aggregateCursor ( array $options = [] )
$options array

allowDiskUse() 공개 메소드

public allowDiskUse ( $allow = true )

explain() 공개 메소드

public explain ( $allow = true )

getOptions() 공개 메소드

public getOptions ( )

group() 공개 메소드

Groups documents by some specified expression and outputs to the next stage a document for each distinct grouping. The output documents contain an _id field which contains the distinct group by key. The output documents can also contain computed fields that hold the values of some accumulator expression grouped by the $group‘s _id field. $group does not order its output documents.
public group ( array | callable $stage ) : Pipeline
$stage array | callable
리턴 Pipeline

jsonSerialize() 공개 메소드

public jsonSerialize ( )

limit() 공개 메소드

public limit ( $limit )

match() 공개 메소드

Filter documents by expression
public match ( array | Expression $expression ) : Pipeline
$expression array | Expression
리턴 Pipeline

project() 공개 메소드

Passes along the documents with only the specified fields to the next stage in the pipeline. The specified fields can be existing fields from the input documents or newly computed fields.
public project ( array $pipeline ) : Pipeline
$pipeline array
리턴 Pipeline

setBatchSize() 공개 메소드

public setBatchSize ( $batchSize )

skip() 공개 메소드

public skip ( $skip )

sort() 공개 메소드

public sort ( array $sortFields )
$sortFields array

toArray() 공개 메소드

public toArray ( )

unwind() 공개 메소드

Each output document is the input document with the value of the array field replaced by the element.
public unwind ( string $path ) : Pipeline
$path string path to field
리턴 Pipeline