【发布时间】:2017-12-20 12:54:31
【问题描述】:
我的数据库有这样的结构:
帖子
-> Key
-> PostId
-> PostName
-> PostDescription
-> PostDescription2
-> Location
-> Author
-> Date
-> Key
->
->
....
不知何故,PostDescription 字段已在 PostDescription2 中重复,我有 n 个这样的节点,我想从所有节点中删除 PostDescription2 的所有条目。我怎样才能做到这一点 ?
我在 google 上进行了一些搜索,但大多数文章都讲述了如何使用查询中的一些逻辑删除子节点或其中的字段。另外,我对 firebase 有点陌生。
【问题讨论】:
-
您需要对get all the relevant nodes、loop over them 和remove the property from each 执行查询。如果您在执行这些步骤中遇到困难,请展示您尝试过的内容。这样会更容易提供帮助。
-
嗨,谢谢@Frank,问题已解决。我只是从数据库中获取了错误的引用。
-
嗨@Frank,有没有办法从控制台查询 Firebase 数据库,就像 aws 为 DynamoDB 提供的一样?
标签: firebase firebase-realtime-database