小编yaf*_*yaf的帖子

MongoDB 高级聚合

我是 MongoDB 的新手。我为我的高尔夫俱乐部做一个 privat 项目来分析这一轮。

我为应用程序使用了meteorJS,并在命令行上尝试了一些聚合。但我不确定我是否对任务有正确的看法

示例文档:

{
    "_id" : "2KasYR3ytsaX8YuoT",
    "course" : {
        "id" : "rHmYJBhRtSt38m68s",
        "name" : "CourseXYZ"
    },
    "player" : {
        "id" : "tdaYaSvXJueDq4oTN",
        "firstname" : "Just",
        "lastname" : "aPlayer"
    },
    "event" : "Training Day",
    "tees" : [
        {
            "tee" : 1,
            "par" : 4,
            "fairway" : "straight",
            "greenInRegulation" : true,
            "putts" : 3,
            "strokes" : 5
        },
        {
            "tee" : 2,
            "par" : 5,
            "fairway" : "right",
            "greenInRegulation" : true,
            "putts" : 2,
            "strokes" : 5 …
Run Code Online (Sandbox Code Playgroud)

mongodb mongodb-query aggregation-framework

3
推荐指数
1
解决办法
1657
查看次数