Firebase查询限制搜索

时间:2018-06-29 15:04:15

标签: node.js firebase admin

JSON结构:

{
    "order_queue": [{
        "status": "open",
        "time_order_placed": 1530283935281
    }, {
        "status": "id2",
        "time_order_placed": 1530283935291
    }, {
        "status": "open",
        "time_order_placed": 1530283935292
    }, {
        "status": "id1",
        "time_order_placed": 1530283935293
    }]
}

我现在可以做什么:我可以通过设置以下规则来查询orderByVal()上的time_order_placed

"order_queue":{
        ".indexOn":"time_order_placed"
      }

问题:在按time_order_placed按值排序后,如何使快照仅返回status :"open"的订单?使用Firebase管理员在节点中编码。

0 个答案:

没有答案