Possibility to set variables used in pipeline stages
Hi !
It would be really handfull to have the possibility to use variables in the pipeline stages:
var userId = ObjectId("5f61dfadc1e8960001700da8'")
{
$match : {user.id : userId}
}
for complex queries, it would avoid having to modify the id at each stages.
Thanks !
9
votes
Vincent
shared this idea
-
Albert commented
I 100% agree.
Using variables for the same date matching in different stages would be another usefulll example.