PipelineStageDefinitionBuilderGraphLookupTInput, TFrom Method (IMongoCollectionTFrom, FieldDefinitionTFrom, BsonValue, FieldDefinitionTFrom, BsonValue, AggregateExpressionDefinitionTInput, BsonValue, FieldDefinitionBsonDocument, IEnumerableBsonDocument, FieldDefinitionBsonDocument, Int32) |
Creates a $graphLookup stage.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.6.0+Branch.origin/v2.6.x.Sha.593796a7b35dc59243383bcc684de296a5468f2e
Syntax public static PipelineStageDefinition<TInput, BsonDocument> GraphLookup<TInput, TFrom>(
IMongoCollection<TFrom> from,
FieldDefinition<TFrom, BsonValue> connectFromField,
FieldDefinition<TFrom, BsonValue> connectToField,
AggregateExpressionDefinition<TInput, BsonValue> startWith,
FieldDefinition<BsonDocument, IEnumerable<BsonDocument>> as,
FieldDefinition<BsonDocument, int> depthField = null
)
Public Shared Function GraphLookup(Of TInput, TFrom) (
from As IMongoCollection(Of TFrom),
connectFromField As FieldDefinition(Of TFrom, BsonValue),
connectToField As FieldDefinition(Of TFrom, BsonValue),
startWith As AggregateExpressionDefinition(Of TInput, BsonValue),
as As FieldDefinition(Of BsonDocument, IEnumerable(Of BsonDocument)),
Optional depthField As FieldDefinition(Of BsonDocument, Integer) = Nothing
) As PipelineStageDefinition(Of TInput, BsonDocument)
static member GraphLookup :
from : IMongoCollection<'TFrom> *
connectFromField : FieldDefinition<'TFrom, BsonValue> *
connectToField : FieldDefinition<'TFrom, BsonValue> *
startWith : AggregateExpressionDefinition<'TInput, BsonValue> *
as : FieldDefinition<BsonDocument, IEnumerable<BsonDocument>> *
?depthField : FieldDefinition<BsonDocument, int>
(* Defaults:
let _depthField = defaultArg depthField null
*)
-> PipelineStageDefinition<'TInput, BsonDocument>
Parameters
- from
- Type: MongoDB.DriverIMongoCollectionTFrom
The from collection. - connectFromField
- Type: MongoDB.DriverFieldDefinitionTFrom, BsonValue
The connect from field. - connectToField
- Type: MongoDB.DriverFieldDefinitionTFrom, BsonValue
The connect to field. - startWith
- Type: MongoDB.DriverAggregateExpressionDefinitionTInput, BsonValue
The start with value. - as
- Type: MongoDB.DriverFieldDefinitionBsonDocument, IEnumerableBsonDocument
The as field. - depthField (Optional)
- Type: MongoDB.DriverFieldDefinitionBsonDocument, Int32
The depth field.
Type Parameters
- TInput
- The type of the input documents.
- TFrom
- The type of the from documents.
Return Value
Type:
PipelineStageDefinitionTInput,
BsonDocumentThe fluent aggregate interface.
See Also