Interface IAggregateFluent

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

Fluent interface for aggregate.

public interface IAggregateFluent<TResult> : IAsyncCursorSource<TResult>

Type Parameters

TResult

The type of the result of the pipeline.

Inherited Members

Extension Methods

IAggregateFluentExtensions.GraphLookup<TResult, TFrom>(IAggregateFluent, IMongoCollection, FieldDefinition<TFrom, BsonValue>, FieldDefinition<TFrom, BsonValue>, AggregateExpressionDefinition<TResult, BsonValue>, FieldDefinition<BsonDocument, IEnumerable>, FieldDefinition<BsonDocument, int>)

IAggregateFluentExtensions.GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult>(IAggregateFluent, IMongoCollection, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TResult, TStartWith>, FieldDefinition<TNewResult, TAs>, AggregateGraphLookupOptions<TFrom, TFrom, TNewResult>)

IAggregateFluentExtensions.GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult>(IAggregateFluent, IMongoCollection, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TResult, TStartWith>>, Expression<Func<TNewResult, TAs>>, AggregateGraphLookupOptions<TFrom, TFrom, TNewResult>)

IAggregateFluentExtensions.GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult>(IAggregateFluent, IMongoCollection, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TResult, TStartWith>>, Expression<Func<TNewResult, TAs>>, Expression<Func<TAsElement, int>>, AggregateGraphLookupOptions<TFrom, TAsElement, TNewResult>)

IAggregateFluentExtensions.Lookup<TResult, TForeignDocument, TNewResult>(IAggregateFluent, IMongoCollection, Expression<Func<TResult, object>>, Expression<Func<TForeignDocument, object>>, Expression<Func<TNewResult, object>>, AggregateLookupOptions<TForeignDocument, TNewResult>)

IAggregateFluentExtensions.Lookup<TResult, TForeignDocument, TAsElement, TAs, TNewResult>(IAggregateFluent, IMongoCollection, BsonDocument, PipelineDefinition<TForeignDocument, TAsElement>, Expression<Func<TNewResult, TAs>>, AggregateLookupOptions<TForeignDocument, TNewResult>)

Properties

Database

Gets the database.

Options

Gets the options.

Stages

Gets the stages.

Methods

AppendStage(PipelineStageDefinition<TResult, TNewResult>)

Appends the stage to the pipeline.

As(IBsonSerializer)

Changes the result type of the pipeline.

BucketAuto(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(AggregateExpressionDefinition<TResult, TValue>, IEnumerable, AggregateBucketOptions)

Appends a $bucket stage to the pipeline.

Bucket<TValue, TNewResult>(AggregateExpressionDefinition<TResult, TValue>, IEnumerable, ProjectionDefinition<TResult, TNewResult>, AggregateBucketOptions)

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. 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, DensifyRange, params FieldDefinition[])

Appends a $densify stage to the pipeline.

Densify(FieldDefinition, DensifyRange, IEnumerable<FieldDefinition>)

Appends a $densify stage to the pipeline.

Facet(IEnumerable<AggregateFacet>, AggregateFacetOptions)

Appends a $facet stage to the pipeline.

GraphLookup<TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TNewResult>(IMongoCollection, 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(ProjectionDefinition<TResult, TNewResult>)

Appends a group stage to the pipeline.

Limit(long)

Appends a limit stage to the pipeline.

Lookup<TForeignDocument, TNewResult>(string, FieldDefinition, FieldDefinition, FieldDefinition, AggregateLookupOptions<TForeignDocument, TNewResult>)

Appends a lookup stage to the pipeline.

Lookup<TForeignDocument, TAsElement, TAs, TNewResult>(IMongoCollection, BsonDocument, PipelineDefinition<TForeignDocument, TAsElement>, FieldDefinition<TNewResult, TAs>, AggregateLookupOptions<TForeignDocument, TNewResult>)

Appends a lookup stage to the pipeline.

Match(FilterDefinition)

Appends a match stage to the pipeline.

MergeAsync(IMongoCollection, MergeStageOptions, 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(IMongoCollection, MergeStageOptions, 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(IBsonSerializer)

Appends a match stage to the pipeline that matches derived documents and changes the result type to the derived type.

Out(IMongoCollection, 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, 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, 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, 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(ProjectionDefinition<TResult, TNewResult>)

Appends a project stage to the pipeline.

ReplaceRoot(AggregateExpressionDefinition<TResult, TNewResult>)

Appends a $replaceRoot stage to the pipeline.

ReplaceWith(AggregateExpressionDefinition<TResult, TNewResult>)

Appends a $replaceWith stage to the pipeline.

Sample(long)

Appends a sample stage to the pipeline.

Search(SearchDefinition, SearchHighlightOptions, string, SearchCountOptions, bool, bool)

Appends a $search stage to the pipeline.

Search(SearchDefinition, SearchOptions)

Appends a $search stage to the pipeline.

SearchMeta(SearchDefinition, string, SearchCountOptions)

Appends a $searchMeta stage to the pipeline.

Set(SetFieldDefinitions)

Appends a $set stage to the pipeline.

SetWindowFields(AggregateExpressionDefinition<ISetWindowFieldsPartition, TWindowFields>)

Appends a $setWindowFields to the pipeline.

SetWindowFields<TPartitionBy, TWindowFields>(AggregateExpressionDefinition<TResult, TPartitionBy>, AggregateExpressionDefinition<ISetWindowFieldsPartition, TWindowFields>)

Appends a $setWindowFields to the pipeline.

SetWindowFields<TPartitionBy, TWindowFields>(AggregateExpressionDefinition<TResult, TPartitionBy>, SortDefinition, AggregateExpressionDefinition<ISetWindowFieldsPartition, TWindowFields>)

Appends a $setWindowFields to the pipeline.

Skip(long)

Appends a skip stage to the pipeline.

Sort(SortDefinition)

Appends a sort stage to the pipeline.

SortByCount(AggregateExpressionDefinition<TResult, TId>)

Appends a sortByCount stage to the pipeline.

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.

UnionWith(IMongoCollection, PipelineDefinition<TWith, TResult>)

Appends an $unionWith stage to the pipeline.

Unwind(FieldDefinition, IBsonSerializer)

Appends an unwind stage to the pipeline.

Unwind(FieldDefinition, AggregateUnwindOptions)

Appends an unwind stage to the pipeline.

VectorSearch(FieldDefinition, QueryVector, int, VectorSearchOptions)

Appends a vector search stage.