Lookup constructor
Lookup({})
Creates ordinary $lookup stage
from- Specifies the collection in the same database to perform the join with. The from collection cannot be sharded.localField- Specifies the field from the documents input to the$lookupstage.$lookupperforms an equality match on thelocalFieldto theforeignFieldfrom the documents of the from collection. If an input document does not contain thelocalField, the$lookuptreats the field as having a value ofnullfor matching purposes.foreignField- Specifies the field from the documents in the from collection.$lookupperforms an equality match on theforeignFieldto thelocalFieldfrom the input documents. If a document in the from collection does not contain theforeignField, the$lookuptreats the value asnullfor matching purposes.as- Specifies the name of the new array field to add to the input documents. The new array field contains the matching documents from the from collection. If the specified name already exists in the input document, the existing field is overwritten.
Implementation
Lookup(
{required String from,
required String localField,
required String foreignField,
required String as})
: super(
'lookup',
AEObject({
'from': from,
'localField': localField,
'foreignField': foreignField,
'as': as
}));