Метод |
Описание |
|
__construct ( Doctrine\MongoDB\Collection $collection ) |
Create a new aggregation builder. |
|
execute ( array $options = [] ) : Doctrine\MongoDB\Iterator |
Executes the aggregation pipeline |
|
expr ( ) : Expr |
|
|
geoNear ( float | array | GeoJson\Geometry\Point $x, float $y = null ) : Doctrine\MongoDB\Aggregation\Stage\GeoNear |
Outputs documents in order of nearest to farthest from a specified point. |
|
getPipeline ( ) : array |
Returns the assembled aggregation pipeline |
|
getStage ( integer $index ) : Stage |
Returns a certain stage from the pipeline |
|
group ( ) : Group |
Groups documents by some specified expression and outputs to the next
stage a document for each distinct grouping. |
|
indexStats ( ) : Doctrine\MongoDB\Aggregation\Stage\IndexStats |
Returns statistics regarding the use of each index for the collection. |
|
limit ( integer $limit ) : Doctrine\MongoDB\Aggregation\Stage\Limit |
Limits the number of documents passed to the next stage in the pipeline. |
|
lookup ( string $from ) : Doctrine\MongoDB\Aggregation\Stage\Lookup |
Performs a left outer join to an unsharded collection in the same
database to filter in documents from the “joined” collection for
processing. |
|
match ( ) : Match |
Filters the documents to pass only the documents that match the specified
condition(s) to the next pipeline stage. |
|
matchExpr ( ) : Expr |
Returns a query expression to be used in match stages |
|
out ( string $collection ) : Out |
Takes the documents returned by the aggregation pipeline and writes them
to a specified collection. This must be the last stage in the pipeline. |
|
project ( ) : 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. |
|
redact ( ) : Doctrine\MongoDB\Aggregation\Stage\Redact |
Restricts the contents of the documents based on information stored in
the documents themselves. |
|
sample ( integer $size ) : Doctrine\MongoDB\Aggregation\Stage\Sample |
Randomly selects the specified number of documents from its input. |
|
skip ( integer $skip ) : Doctrine\MongoDB\Aggregation\Stage\Skip |
Skips over the specified number of documents that pass into the stage and
passes the remaining documents to the next stage in the pipeline. |
|
sort ( array | string $fieldName, integer | string $order = null ) : Doctrine\MongoDB\Aggregation\Stage\Sort |
Sorts all input documents and returns them to the pipeline in sorted
order. |
|
unwind ( string $fieldName ) : Doctrine\MongoDB\Aggregation\Stage\Unwind |
Deconstructs an array field from the input documents to output a document
for each element. Each output document is the input document with the
value of the array field replaced by the element. |
|