PipelineStageDefinitionBuilderGraphLookupTInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput Method (IMongoCollectionTFrom, FieldDefinitionTFrom, TConnectFrom, FieldDefinitionTFrom, TConnectTo, AggregateExpressionDefinitionTInput, TStartWith, FieldDefinitionTOutput, TAs, FieldDefinitionTAsElement, Int32, AggregateGraphLookupOptionsTFrom, TAsElement, TOutput) |
Creates a $graphLookup stage.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.11.0+cb27a82ea70620ad1acad8058809be8302ae4f2a
Syntax public static PipelineStageDefinition<TInput, TOutput> GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(
IMongoCollection<TFrom> from,
FieldDefinition<TFrom, TConnectFrom> connectFromField,
FieldDefinition<TFrom, TConnectTo> connectToField,
AggregateExpressionDefinition<TInput, TStartWith> startWith,
FieldDefinition<TOutput, TAs> as,
FieldDefinition<TAsElement, int> depthField,
AggregateGraphLookupOptions<TFrom, TAsElement, TOutput> options = null
)
where TAs : Object, IEnumerable<TAsElement>
Public Shared Function GraphLookup(Of TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs As {Object, IEnumerable(Of TAsElement)}, TOutput) (
from As IMongoCollection(Of TFrom),
connectFromField As FieldDefinition(Of TFrom, TConnectFrom),
connectToField As FieldDefinition(Of TFrom, TConnectTo),
startWith As AggregateExpressionDefinition(Of TInput, TStartWith),
as As FieldDefinition(Of TOutput, TAs),
depthField As FieldDefinition(Of TAsElement, Integer),
Optional options As AggregateGraphLookupOptions(Of TFrom, TAsElement, TOutput) = Nothing
) As PipelineStageDefinition(Of TInput, TOutput)
static member GraphLookup :
from : IMongoCollection<'TFrom> *
connectFromField : FieldDefinition<'TFrom, 'TConnectFrom> *
connectToField : FieldDefinition<'TFrom, 'TConnectTo> *
startWith : AggregateExpressionDefinition<'TInput, 'TStartWith> *
as : FieldDefinition<'TOutput, 'TAs> *
depthField : FieldDefinition<'TAsElement, int> *
?options : AggregateGraphLookupOptions<'TFrom, 'TAsElement, 'TOutput>
(* Defaults:
let _options = defaultArg options null
*)
-> PipelineStageDefinition<'TInput, 'TOutput> when 'TAs : Object and IEnumerable<'TAsElement>
Parameters
- from
- Type: MongoDB.DriverIMongoCollectionTFrom
The from collection. - connectFromField
- Type: MongoDB.DriverFieldDefinitionTFrom, TConnectFrom
The connect from field. - connectToField
- Type: MongoDB.DriverFieldDefinitionTFrom, TConnectTo
The connect to field. - startWith
- Type: MongoDB.DriverAggregateExpressionDefinitionTInput, TStartWith
The start with value. - as
- Type: MongoDB.DriverFieldDefinitionTOutput, TAs
The as field. - depthField
- Type: MongoDB.DriverFieldDefinitionTAsElement, Int32
The depth field. - options (Optional)
- Type: MongoDB.DriverAggregateGraphLookupOptionsTFrom, TAsElement, TOutput
The options.
Type Parameters
- TInput
- The type of the input documents.
- TFrom
- The type of the from documents.
- TConnectFrom
- The type of the connect from field (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
- TConnectTo
- The type of the connect to field.
- TStartWith
- The type of the start with expression (must be either TConnectTo or a type that implements IEnumerable{TConnectTo}).
- TAsElement
- The type of the as field elements.
- TAs
- The type of the as field.
- TOutput
- The type of the output documents.
Return Value
Type:
PipelineStageDefinitionTInput,
TOutputThe stage.
See Also