PipelineStageDefinitionBuilderLookupTInput, TForeignDocument, TOutput Method (IMongoCollectionTForeignDocument, FieldDefinitionTInput, FieldDefinitionTForeignDocument, FieldDefinitionTOutput, AggregateLookupOptionsTForeignDocument, TOutput) |
Creates a $lookup 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> Lookup<TInput, TForeignDocument, TOutput>(
IMongoCollection<TForeignDocument> foreignCollection,
FieldDefinition<TInput> localField,
FieldDefinition<TForeignDocument> foreignField,
FieldDefinition<TOutput> as,
AggregateLookupOptions<TForeignDocument, TOutput> options = null
)
Public Shared Function Lookup(Of TInput, TForeignDocument, TOutput) (
foreignCollection As IMongoCollection(Of TForeignDocument),
localField As FieldDefinition(Of TInput),
foreignField As FieldDefinition(Of TForeignDocument),
as As FieldDefinition(Of TOutput),
Optional options As AggregateLookupOptions(Of TForeignDocument, TOutput) = Nothing
) As PipelineStageDefinition(Of TInput, TOutput)
static member Lookup :
foreignCollection : IMongoCollection<'TForeignDocument> *
localField : FieldDefinition<'TInput> *
foreignField : FieldDefinition<'TForeignDocument> *
as : FieldDefinition<'TOutput> *
?options : AggregateLookupOptions<'TForeignDocument, 'TOutput>
(* Defaults:
let _options = defaultArg options null
*)
-> PipelineStageDefinition<'TInput, 'TOutput>
Parameters
- foreignCollection
- Type: MongoDB.DriverIMongoCollectionTForeignDocument
The foreign collection. - localField
- Type: MongoDB.DriverFieldDefinitionTInput
The local field. - foreignField
- Type: MongoDB.DriverFieldDefinitionTForeignDocument
The foreign field. - as
- Type: MongoDB.DriverFieldDefinitionTOutput
The "as" field. - options (Optional)
- Type: MongoDB.DriverAggregateLookupOptionsTForeignDocument, TOutput
The options.
Type Parameters
- TInput
- The type of the input documents.
- TForeignDocument
- The type of the foreign collection documents.
- TOutput
- The type of the output documents.
Return Value
Type:
PipelineStageDefinitionTInput,
TOutputThe stage.
See Also