PipelineStageDefinitionBuilderGraphLookupTInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput Method (IMongoCollectionTFrom, ExpressionFuncTFrom, TConnectFrom, ExpressionFuncTFrom, TConnectTo, ExpressionFuncTInput, TStartWith, ExpressionFuncTOutput, TAs, ExpressionFuncTAsElement, Int32, AggregateGraphLookupOptionsTFrom, TAsElement, TOutput, ExpressionTranslationOptions) |
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, TOutput> GraphLookup<TInput, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(
IMongoCollection<TFrom> from,
Expression<Func<TFrom, TConnectFrom>> connectFromField,
Expression<Func<TFrom, TConnectTo>> connectToField,
Expression<Func<TInput, TStartWith>> startWith,
Expression<Func<TOutput, TAs>> as,
Expression<Func<TAsElement, int>> depthField,
AggregateGraphLookupOptions<TFrom, TAsElement, TOutput> options = null,
ExpressionTranslationOptions translationOptions = 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 Expression(Of Func(Of TFrom, TConnectFrom)),
connectToField As Expression(Of Func(Of TFrom, TConnectTo)),
startWith As Expression(Of Func(Of TInput, TStartWith)),
as As Expression(Of Func(Of TOutput, TAs)),
depthField As Expression(Of Func(Of TAsElement, Integer)),
Optional options As AggregateGraphLookupOptions(Of TFrom, TAsElement, TOutput) = Nothing,
Optional translationOptions As ExpressionTranslationOptions = Nothing
) As PipelineStageDefinition(Of TInput, TOutput)
static member GraphLookup :
from : IMongoCollection<'TFrom> *
connectFromField : Expression<Func<'TFrom, 'TConnectFrom>> *
connectToField : Expression<Func<'TFrom, 'TConnectTo>> *
startWith : Expression<Func<'TInput, 'TStartWith>> *
as : Expression<Func<'TOutput, 'TAs>> *
depthField : Expression<Func<'TAsElement, int>> *
?options : AggregateGraphLookupOptions<'TFrom, 'TAsElement, 'TOutput> *
?translationOptions : ExpressionTranslationOptions
(* Defaults:
let _options = defaultArg options null
let _translationOptions = defaultArg translationOptions null
*)
-> PipelineStageDefinition<'TInput, 'TOutput> when 'TAs : Object and IEnumerable<'TAsElement>
Parameters
- 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.ExpressionsExpressionFuncTInput, TStartWith
The start with value. - as
- Type: System.Linq.ExpressionsExpressionFuncTOutput, TAs
The as field. - depthField
- Type: System.Linq.ExpressionsExpressionFuncTAsElement, Int32
The depth field. - options (Optional)
- Type: MongoDB.DriverAggregateGraphLookupOptionsTFrom, TAsElement, TOutput
The options. - translationOptions (Optional)
- Type: MongoDB.DriverExpressionTranslationOptions
The translation 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