Class AggregateFluentBase<TResult>
Base class for implementors of IAggregateFluent<TResult>.
public abstract class AggregateFluentBase<TResult> : IOrderedAggregateFluent<TResult>, IAggregateFluent<TResult>, IAsyncCursorSource<TResult>
Type Parameters
TResult
The type of the document.
- Inheritance
-
AggregateFluentBase<TResult>
- Implements
-
IOrderedAggregateFluent<TResult>IAggregateFluent<TResult>IAsyncCursorSource<TResult>
- Inherited Members
- Extension Methods
Properties
- Database
Gets the database.
- Options
Gets the options.
- Stages
Gets the stages.
Methods
- AppendStage<TNewResult>(PipelineStageDefinition<TResult, TNewResult>)
Appends the stage to the pipeline.
- As<TNewResult>(IBsonSerializer<TNewResult>)
Changes the result type of the pipeline.
- BucketAuto<TValue>(AggregateExpressionDefinition<TResult, TValue>, int, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
- BucketAuto<TValue, TNewResult>(AggregateExpressionDefinition<TResult, TValue>, int, ProjectionDefinition<TResult, TNewResult>, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline with a custom projection.
- Bucket<TValue>(AggregateExpressionDefinition<TResult, TValue>, IEnumerable<TValue>, AggregateBucketOptions<TValue>)
Appends a $bucket stage to the pipeline.
- Bucket<TValue, TNewResult>(AggregateExpressionDefinition<TResult, TValue>, IEnumerable<TValue>, ProjectionDefinition<TResult, TNewResult>, AggregateBucketOptions<TValue>)
Appends a $bucket stage to the pipeline with a custom projection.
- ChangeStream(ChangeStreamStageOptions)
Appends a $changeStream stage to the pipeline. Normally you would prefer to use the Watch method of IMongoCollection<TDocument>. Only use this method if subsequent stages project away the resume token (the _id) or you don't want the resulting cursor to automatically resume.
- Count()
Appends a count stage to the pipeline.
- Densify(FieldDefinition<TResult>, DensifyRange, params FieldDefinition<TResult>[])
Appends a $densify stage to the pipeline.
- Densify(FieldDefinition<TResult>, DensifyRange, IEnumerable<FieldDefinition<TResult>>)
Appends a $densify stage to the pipeline.
- Facet<TNewResult>(IEnumerable<AggregateFacet<TResult>>, AggregateFacetOptions<TNewResult>)
Appends a $facet stage to the pipeline.
- GraphLookup<TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult>(IMongoCollection<TFrom>, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TResult, TStartWith>, FieldDefinition<TNewResult, TAs>, FieldDefinition<TAsElement, int>, AggregateGraphLookupOptions<TFrom, TAsElement, TNewResult>)
Appends a $graphLookup stage to the pipeline.
- Group<TNewResult>(ProjectionDefinition<TResult, TNewResult>)
Appends a group stage to the pipeline.
- Limit(long)
Appends a limit stage to the pipeline.
- Lookup<TForeignDocument, TNewResult>(string, FieldDefinition<TResult>, FieldDefinition<TForeignDocument>, FieldDefinition<TNewResult>, AggregateLookupOptions<TForeignDocument, TNewResult>)
Appends a lookup stage to the pipeline.
- Lookup<TForeignDocument, TAsElement, TAs, TNewResult>(IMongoCollection<TForeignDocument>, BsonDocument, PipelineDefinition<TForeignDocument, TAsElement>, FieldDefinition<TNewResult, TAs>, AggregateLookupOptions<TForeignDocument, TNewResult>)
Appends a lookup stage to the pipeline.
- Match(FilterDefinition<TResult>)
Appends a match stage to the pipeline.
- MergeAsync<TOutput>(IMongoCollection<TOutput>, MergeStageOptions<TOutput>, CancellationToken)
Appends a merge stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- Merge<TOutput>(IMongoCollection<TOutput>, MergeStageOptions<TOutput>, CancellationToken)
Appends a merge stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- OfType<TNewResult>(IBsonSerializer<TNewResult>)
Appends a match stage to the pipeline that matches derived documents and changes the result type to the derived type.
- Out(IMongoCollection<TResult>, TimeSeriesOptions, CancellationToken)
Appends an out stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- Out(IMongoCollection<TResult>, CancellationToken)
Appends an out stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- Out(string, TimeSeriesOptions, CancellationToken)
Appends an out stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- Out(string, CancellationToken)
Appends an out stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- OutAsync(IMongoCollection<TResult>, TimeSeriesOptions, CancellationToken)
Appends an out stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- OutAsync(IMongoCollection<TResult>, CancellationToken)
Appends an out stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- OutAsync(string, TimeSeriesOptions, CancellationToken)
Appends an out stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- OutAsync(string, CancellationToken)
Appends an out stage to the pipeline and executes it, and then returns a cursor to read the contents of the output collection.
- Project<TNewResult>(ProjectionDefinition<TResult, TNewResult>)
Appends a project stage to the pipeline.
- ReplaceRoot<TNewResult>(AggregateExpressionDefinition<TResult, TNewResult>)
Appends a $replaceRoot stage to the pipeline.
- ReplaceWith<TNewResult>(AggregateExpressionDefinition<TResult, TNewResult>)
Appends a $replaceWith stage to the pipeline.
- Search(SearchDefinition<TResult>, SearchHighlightOptions<TResult>, string, SearchCountOptions, bool, bool)
Appends a $search stage to the pipeline.
- Search(SearchDefinition<TResult>, SearchOptions<TResult>)
Appends a $search stage to the pipeline.
- SearchMeta(SearchDefinition<TResult>, string, SearchCountOptions)
Appends a $searchMeta stage to the pipeline.
- Set(SetFieldDefinitions<TResult>)
Appends a $set stage to the pipeline.
- SetWindowFields<TWindowFields>(AggregateExpressionDefinition<ISetWindowFieldsPartition<TResult>, TWindowFields>)
Appends a $setWindowFields to the pipeline.
- SetWindowFields<TPartitionBy, TWindowFields>(AggregateExpressionDefinition<TResult, TPartitionBy>, AggregateExpressionDefinition<ISetWindowFieldsPartition<TResult>, TWindowFields>)
Appends a $setWindowFields to the pipeline.
- SetWindowFields<TPartitionBy, TWindowFields>(AggregateExpressionDefinition<TResult, TPartitionBy>, SortDefinition<TResult>, AggregateExpressionDefinition<ISetWindowFieldsPartition<TResult>, TWindowFields>)
Appends a $setWindowFields to the pipeline.
- Skip(long)
Appends a skip stage to the pipeline.
- Sort(SortDefinition<TResult>)
Appends a sort stage to the pipeline.
- SortByCount<TId>(AggregateExpressionDefinition<TResult, TId>)
Appends a sortByCount stage to the pipeline.
- ThenBy(SortDefinition<TResult>)
Combines the current sort definition with an additional sort definition.
- ToCollection(CancellationToken)
Executes an aggregation pipeline that writes the results to a collection.
- ToCollectionAsync(CancellationToken)
Executes an aggregation pipeline that writes the results to a collection.
- ToCursor(CancellationToken)
Executes the operation and returns a cursor to the results.
- ToCursorAsync(CancellationToken)
Executes the operation and returns a cursor to the results.
- UnionWith<TWith>(IMongoCollection<TWith>, PipelineDefinition<TWith, TResult>)
Appends an $unionWith stage to the pipeline.
- Unwind<TNewResult>(FieldDefinition<TResult>, IBsonSerializer<TNewResult>)
Appends an unwind stage to the pipeline.
- Unwind<TNewResult>(FieldDefinition<TResult>, AggregateUnwindOptions<TNewResult>)
Appends an unwind stage to the pipeline.
- VectorSearch(FieldDefinition<TResult>, QueryVector, int, VectorSearchOptions<TResult>)
Appends a vector search stage.