IAggregateFluentExtensionsGraphLookupTResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult Method (IAggregateFluentTResult, IMongoCollectionTFrom, FieldDefinitionTFrom, TConnectFrom, FieldDefinitionTFrom, TConnectTo, AggregateExpressionDefinitionTResult, TStartWith, FieldDefinitionTNewResult, TAs, AggregateGraphLookupOptionsTFrom, TFrom, TNewResult) |
Appends a $graphLookup stage to the pipeline.
Namespace:
MongoDB.Driver
Assembly:
MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.15.0+f503bf610759c13f78cff9a3c01e91453185d2ed
Syntax public static IAggregateFluent<TNewResult> GraphLookup<TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TNewResult>(
this IAggregateFluent<TResult> aggregate,
IMongoCollection<TFrom> from,
FieldDefinition<TFrom, TConnectFrom> connectFromField,
FieldDefinition<TFrom, TConnectTo> connectToField,
AggregateExpressionDefinition<TResult, TStartWith> startWith,
FieldDefinition<TNewResult, TAs> as,
AggregateGraphLookupOptions<TFrom, TFrom, TNewResult> options = null
)
where TAs : Object, IEnumerable<TFrom>
<ExtensionAttribute>
Public Shared Function GraphLookup(Of TResult, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs As {Object, IEnumerable(Of TFrom)}, TNewResult) (
aggregate As IAggregateFluent(Of TResult),
from As IMongoCollection(Of TFrom),
connectFromField As FieldDefinition(Of TFrom, TConnectFrom),
connectToField As FieldDefinition(Of TFrom, TConnectTo),
startWith As AggregateExpressionDefinition(Of TResult, TStartWith),
as As FieldDefinition(Of TNewResult, TAs),
Optional options As AggregateGraphLookupOptions(Of TFrom, TFrom, TNewResult) = Nothing
) As IAggregateFluent(Of TNewResult)
[<ExtensionAttribute>]
static member GraphLookup :
aggregate : IAggregateFluent<'TResult> *
from : IMongoCollection<'TFrom> *
connectFromField : FieldDefinition<'TFrom, 'TConnectFrom> *
connectToField : FieldDefinition<'TFrom, 'TConnectTo> *
startWith : AggregateExpressionDefinition<'TResult, 'TStartWith> *
as : FieldDefinition<'TNewResult, 'TAs> *
?options : AggregateGraphLookupOptions<'TFrom, 'TFrom, 'TNewResult>
(* Defaults:
let _options = defaultArg options null
*)
-> IAggregateFluent<'TNewResult> when 'TAs : Object and IEnumerable<'TFrom>
Parameters
- aggregate
- Type: MongoDB.DriverIAggregateFluentTResult
The aggregate. - 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.DriverAggregateExpressionDefinitionTResult, TStartWith
The start with value. - as
- Type: MongoDB.DriverFieldDefinitionTNewResult, TAs
The as field. - options (Optional)
- Type: MongoDB.DriverAggregateGraphLookupOptionsTFrom, TFrom, TNewResult
The options.
Type Parameters
- TResult
- The type of the result.
- 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.
- TNewResult
- The type of the new result (must be same as TResult with an additional as field).
Return Value
Type:
IAggregateFluentTNewResultThe fluent aggregate interface.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAggregateFluentTResult. 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