PipelineDefinitionBuilderGraphLookupTInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput Method (PipelineDefinitionTInput, TIntermediate, IMongoCollectionTFrom, ExpressionFuncTFrom, TConnectFrom, ExpressionFuncTFrom, TConnectTo, ExpressionFuncTIntermediate, TStartWith, ExpressionFuncTOutput, TAs, AggregateGraphLookupOptionsTFrom, TFrom, TOutput, ExpressionTranslationOptions) |
Appends a $graphLookup stage to the pipeline.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.5.0+57.Branch.master.Sha.6a4e00a2d91090c65a9b11364b9ebfdb9c7da076
Syntax public static PipelineDefinition<TInput, TOutput> GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(
this PipelineDefinition<TInput, TIntermediate> pipeline,
IMongoCollection<TFrom> from,
Expression<Func<TFrom, TConnectFrom>> connectFromField,
Expression<Func<TFrom, TConnectTo>> connectToField,
Expression<Func<TIntermediate, TStartWith>> startWith,
Expression<Func<TOutput, TAs>> as,
AggregateGraphLookupOptions<TFrom, TFrom, TOutput> options = null,
ExpressionTranslationOptions translationOptions = null
)
where TAs : Object, IEnumerable<TFrom>
<ExtensionAttribute>
Public Shared Function GraphLookup(Of TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs As {Object, IEnumerable(Of TFrom)}, TOutput) (
pipeline As PipelineDefinition(Of TInput, TIntermediate),
from As IMongoCollection(Of TFrom),
connectFromField As Expression(Of Func(Of TFrom, TConnectFrom)),
connectToField As Expression(Of Func(Of TFrom, TConnectTo)),
startWith As Expression(Of Func(Of TIntermediate, TStartWith)),
as As Expression(Of Func(Of TOutput, TAs)),
Optional options As AggregateGraphLookupOptions(Of TFrom, TFrom, TOutput) = Nothing,
Optional translationOptions As ExpressionTranslationOptions = Nothing
) As PipelineDefinition(Of TInput, TOutput)
[<ExtensionAttribute>]
static member GraphLookup :
pipeline : PipelineDefinition<'TInput, 'TIntermediate> *
from : IMongoCollection<'TFrom> *
connectFromField : Expression<Func<'TFrom, 'TConnectFrom>> *
connectToField : Expression<Func<'TFrom, 'TConnectTo>> *
startWith : Expression<Func<'TIntermediate, 'TStartWith>> *
as : Expression<Func<'TOutput, 'TAs>> *
?options : AggregateGraphLookupOptions<'TFrom, 'TFrom, 'TOutput> *
?translationOptions : ExpressionTranslationOptions
(* Defaults:
let _options = defaultArg options null
let _translationOptions = defaultArg translationOptions null
*)
-> PipelineDefinition<'TInput, 'TOutput> when 'TAs : Object and IEnumerable<'TFrom>
Parameters
- pipeline
- Type: MongoDB.DriverPipelineDefinitionTInput, TIntermediate
The pipeline. - from
- Type: MongoDB.DriverIMongoCollectionTFrom
The from collection. - connectFromField
- Type: System.Linq.ExpressionsExpressionFuncTFrom, TConnectFrom
The connect from field. - connectToField
- Type: System.Linq.ExpressionsExpressionFuncTFrom, TConnectTo
The connect to field. - startWith
- Type: System.Linq.ExpressionsExpressionFuncTIntermediate, TStartWith
The start with value. - as
- Type: System.Linq.ExpressionsExpressionFuncTOutput, TAs
The as field. - options (Optional)
- Type: MongoDB.DriverAggregateGraphLookupOptionsTFrom, TFrom, TOutput
The options. - translationOptions (Optional)
- Type: MongoDB.DriverExpressionTranslationOptions
The translation options.
Type Parameters
- TInput
- The type of the input documents.
- TIntermediate
- The type of the intermediate 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}).
- TAs
- The type of the as field.
- TOutput
- The type of the output documents.
Return Value
Type:
PipelineDefinitionTInput,
TOutputThe stage.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
PipelineDefinitionTInput,
TIntermediate. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also