Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$Lookup(聚合)中缺少实现方法 #39

Open
WhaleFalls0807 opened this issue May 17, 2022 · 0 comments
Open

$Lookup(聚合)中缺少实现方法 #39

WhaleFalls0807 opened this issue May 17, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@WhaleFalls0807
Copy link
Collaborator

在执行聚合操作时,$lookup内部的pipeline没有实现方法

预期执行的语句
db.orders.aggregate( [
{
$lookup:
{
from: "warehouses",
let: { order_item: "$item", order_qty: "$ordered" },
pipeline: [
{ $match:
{ $expr:
{ $and:
[
{ $eq: [ "$stock_item", "$$order_item" ] },
{ $gte: [ "$instock", "$$order_qty" ] }
]
}
}
},
{ $project: { stock_item: 0, _id: 0 } }
],
as: "stockdata"
}
}
] )

@HbnKing HbnKing added the enhancement New feature or request label May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants