zoukankan      html  css  js  c++  java
  • $filter

    db.inventory.aggregate(
    [
    {
    $unwind: "$sizes"
    }
    ,
    {
    $group:{"}
    }
    ] )


    sudo iptables -L -n
    service iptables status
    service iptables start

    $project: {
    items: {
    $filter: {
    input: "$items",
    as: "item",
    cond: { $gte: [ "$$item.price", 100 ] }
    }
    }
    }

    msg: {$filter: {input: "$msg", as: "msg", cond: {$eq: ["$$msg.name", "name1"]}}}
    $filter: { input: [ 1, "a", 2, null, 3.1, NumberLong(4), "5" ], as: "num", cond: { $and: [ { $gte: [ "$$num", NumberLong("-9223372036854775807") ] }, { $lte: [ "$$num", NumberLong("9223372036854775807") ] } ] } }

    db.collectionname.aggregate({$match: {"msg.name": "name1"}}, {$project: {_id: 0, timestamp: "$timestamp", msg: {$filter: {input: "$msg", as: "msg", cond: {$eq: ["$$msg.name", "name1"]}}}}})

  • 相关阅读:
    距离某天还有多久
    U3D各键值说明
    一些比较重要的函数
    U3D功能脚本备忘
    沟边
    渲染排序
    字符串转整数备录
    沟边
    U3D优化
    Unity中的四个路径
  • 原文地址:https://www.cnblogs.com/jayruan/p/5867711.html
Copyright © 2011-2022 走看看