How do I write/update data to multiple child nodes via Firebase Cloud functions?

前端 未结 2 1417
暗喜
暗喜 2020-12-22 02:26

I\'ve got a database that looks like this:

I want to reset the Patient_List and Current_Token children to 0 at a particular time (

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-22 03:00

    It's not possible to have a single update statement affect a child of all database nodes under some location. You will have to iterate all the nodes (by querying/reading them somehow), then update each one that you find. This is potentially a costly operation in terns of bandwidth.

提交回复
热议问题