Class PipelineStageDefinitionBuilder

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

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

Methods for building pipeline stages.

public static class PipelineStageDefinitionBuilder

Inheritance

PipelineStageDefinitionBuilder

Inherited Members

Methods

BucketAuto<TInput, TValue>(AggregateExpressionDefinition<TInput, TValue>, int, AggregateBucketAutoOptions)

Creates a $bucketAuto stage.

BucketAuto<TInput, TValue>(Expression<Func<TInput, TValue>>, int, AggregateBucketAutoOptions)

Creates a $bucketAuto stage.

BucketAuto<TInput, TValue, TOutput>(AggregateExpressionDefinition<TInput, TValue>, int, ProjectionDefinition<TInput, TOutput>, AggregateBucketAutoOptions)

Creates a $bucketAuto stage.

BucketAuto<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>>, int, Expression<Func<IGrouping<AggregateBucketAutoResultId, TInput>, TOutput>>, AggregateBucketAutoOptions)

Creates a $bucketAuto stage (this overload can only be used with LINQ3).

Bucket<TInput, TValue>(AggregateExpressionDefinition<TInput, TValue>, IEnumerable, AggregateBucketOptions)

Creates a $bucket stage.

Bucket<TInput, TValue>(Expression<Func<TInput, TValue>>, IEnumerable, AggregateBucketOptions)

Creates a $bucket stage.

Bucket<TInput, TValue, TOutput>(AggregateExpressionDefinition<TInput, TValue>, IEnumerable, ProjectionDefinition<TInput, TOutput>, AggregateBucketOptions)

Creates a $bucket stage.

Bucket<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>>, IEnumerable, Expression<Func<IGrouping<TValue, TInput>, TOutput>>, AggregateBucketOptions)

Creates a $bucket stage.

ChangeStreamSplitLargeEvent()

Creates a $changeStreamSplitLargeEvent stage.

ChangeStream(ChangeStreamStageOptions)

Creates a $changeStream stage. 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()

Creates a $count stage.

Densify(FieldDefinition, DensifyRange, params FieldDefinition[])

Creates a $densify stage.

Densify(FieldDefinition, DensifyRange, IEnumerable<FieldDefinition>)

Creates a $densify stage.

Densify(Expression<Func<TInput, object>>, DensifyRange, IEnumerable<Expression<Func<TInput, object>>>)

Creates a $densify stage.

Densify(Expression<Func<TInput, object>>, DensifyRange, params Expression<Func<TInput, object>>[])

Creates a $densify stage.

Documents(AggregateExpressionDefinition<NoPipelineInput, IEnumerable>, IBsonSerializer)

Creates a $documents stage.

Documents(IEnumerable, IBsonSerializer)

Creates a $documents stage.

Facet(params AggregateFacet[])

Creates a $facet stage.

Facet(IEnumerable<AggregateFacet>)

Creates a $facet stage.

Facet<TInput, TOutput>(params AggregateFacet[])

Creates a $facet stage.

Facet<TInput, TOutput>(IEnumerable<AggregateFacet>, AggregateFacetOptions)

Creates a $facet stage.

GeoNear<TInput, TOutput>(double[], GeoNearOptions<TInput, TOutput>)

Creates a $geoNear stage.

GeoNear<TInput, TCoordinates, TOutput>(GeoJsonPoint, GeoNearOptions<TInput, TOutput>)

Creates a $geoNear stage.

GraphLookup<TInput, TFrom>(IMongoCollection, FieldDefinition<TFrom, BsonValue>, FieldDefinition<TFrom, BsonValue>, AggregateExpressionDefinition<TInput, BsonValue>, FieldDefinition<BsonDocument, IEnumerable>, FieldDefinition<BsonDocument, int>)

Creates a $graphLookup stage.

GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(IMongoCollection, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TInput, TStartWith>, FieldDefinition<TOutput, TAs>, AggregateGraphLookupOptions<TFrom, TFrom, TOutput>)

Creates a $graphLookup stage.

GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(IMongoCollection, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TInput, TStartWith>>, Expression<Func<TOutput, TAs>>, AggregateGraphLookupOptions<TFrom, TFrom, TOutput>)

Creates a $graphLookup stage.

GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(IMongoCollection, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TInput, TStartWith>, FieldDefinition<TOutput, TAs>, FieldDefinition<TAsElement, int>, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>)

Creates a $graphLookup stage.

GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(IMongoCollection, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TInput, TStartWith>>, Expression<Func<TOutput, TAs>>, Expression<Func<TAsElement, int>>, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>)

Creates a $graphLookup stage.

Group(ProjectionDefinition<TInput, BsonDocument>)

Creates a $group stage.

Group<TInput, TOutput>(ProjectionDefinition<TInput, TOutput>)

Creates a $group stage.

Group<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>>, Expression<Func<IGrouping<TValue, TInput>, TOutput>>)

Creates a $group stage.

Limit(long)

Creates a $limit stage.

Lookup<TInput, TForeignDocument, TOutput>(IMongoCollection, FieldDefinition, FieldDefinition, FieldDefinition, AggregateLookupOptions<TForeignDocument, TOutput>)

Creates a $lookup stage.

Lookup<TInput, TForeignDocument, TOutput>(IMongoCollection, Expression<Func<TInput, object>>, Expression<Func<TForeignDocument, object>>, Expression<Func<TOutput, object>>, AggregateLookupOptions<TForeignDocument, TOutput>)

Creates a $lookup stage.

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

Creates a $lookup stage.

Lookup<TInput, TForeignDocument, TAsElement, TAs, TOutput>(IMongoCollection, BsonDocument, PipelineDefinition<TForeignDocument, TAsElement>, Expression<Func<TOutput, TAs>>, AggregateLookupOptions<TForeignDocument, TOutput>)

Creates a $lookup stage.

Match(FilterDefinition)

Creates a $match stage.

Match(Expression<Func<TInput, bool>>)

Creates a $match stage.

Merge<TInput, TOutput>(IMongoCollection, MergeStageOptions)

Creates a $merge stage.

OfType<TInput, TOutput>(IBsonSerializer)

Create a $match stage that select documents of a sub type.

Out(IMongoCollection, TimeSeriesOptions)

Creates a $out stage.

Project(ProjectionDefinition<TInput, BsonDocument>)

Creates a $project stage.

Project<TInput, TOutput>(ProjectionDefinition<TInput, TOutput>)

Creates a $project stage.

Project<TInput, TOutput>(Expression<Func<TInput, TOutput>>)

Creates a $project stage.

RankFusion<TInput, TOutput>(PipelineDefinition<TInput, TOutput>[], RankFusionOptions)

Creates a $rankFusion stage. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.

RankFusion<TInput, TOutput>(Dictionary<string, PipelineDefinition<TInput, TOutput>>, Dictionary<string, double>, RankFusionOptions)

Creates a $rankFusion stage.

RankFusion<TInput, TOutput>((PipelineDefinition<TInput, TOutput> Pipeline, double? Weight)[], RankFusionOptions)

Creates a $rankFusion stage. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.

ReplaceRoot<TInput, TOutput>(AggregateExpressionDefinition<TInput, TOutput>)

Creates a $replaceRoot stage.

ReplaceRoot<TInput, TOutput>(Expression<Func<TInput, TOutput>>)

Creates a $replaceRoot stage.

ReplaceWith<TInput, TOutput>(AggregateExpressionDefinition<TInput, TOutput>)

Creates a $replaceWith stage.

ReplaceWith<TInput, TOutput>(Expression<Func<TInput, TOutput>>)

Creates a $replaceWith stage.

Sample(long)

Creates a $sample stage.

SearchMeta(SearchDefinition, string, SearchCountOptions)

Creates a $searchMeta stage.

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

Creates a $search stage.

Search(SearchDefinition, SearchOptions)

Creates a $search stage.

SetWindowFields<TInput, TWindowFields>(AggregateExpressionDefinition<ISetWindowFieldsPartition, TWindowFields>)

Create a $setWindowFields stage.

SetWindowFields<TInput, TWindowFields>(Expression<Func<ISetWindowFieldsPartition, TWindowFields>>)

Create a $setWindowFields stage.

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

Create a $setWindowFields stage.

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

Create a $setWindowFields stage.

SetWindowFields<TInput, TPartitionBy, TWindowFields>(Expression<Func<TInput, TPartitionBy>>, SortDefinition, Expression<Func<ISetWindowFieldsPartition, TWindowFields>>)

Create a $setWindowFields stage.

SetWindowFields<TInput, TPartitionBy, TWindowFields>(Expression<Func<TInput, TPartitionBy>>, Expression<Func<ISetWindowFieldsPartition, TWindowFields>>)

Create a $setWindowFields stage.

Set(SetFieldDefinitions)

Creates a $set stage.

Set<TInput, TFields>(Expression<Func<TInput, TFields>>)

Creates a $set stage.

Skip(long)

Creates a $skip stage.

SortByCount<TInput, TValue>(AggregateExpressionDefinition<TInput, TValue>)

Creates a $sortByCount stage.

SortByCount<TInput, TValue>(Expression<Func<TInput, TValue>>)

Creates a $sortByCount stage.

Sort(SortDefinition)

Creates a $sort stage.

UnionWith<TInput, TWith>(IMongoCollection, PipelineDefinition<TWith, TInput>)

Creates a $unionWith stage.

Unwind(FieldDefinition, AggregateUnwindOptions)

Creates an $unwind stage.

Unwind(Expression<Func<TInput, object>>, AggregateUnwindOptions)

Creates an $unwind stage.

Unwind<TInput, TOutput>(FieldDefinition, AggregateUnwindOptions)

Creates an $unwind stage.

Unwind<TInput, TOutput>(Expression<Func<TInput, object>>, AggregateUnwindOptions)

Creates an $unwind stage.

VectorSearch(FieldDefinition, QueryVector, int, VectorSearchOptions)

Creates a $vectorSearch stage.

VectorSearch<TInput, TField>(Expression<Func<TInput, TField>>, QueryVector, int, VectorSearchOptions)

Creates a $vectorSearch stage.