【问题标题】:Is there any way to create update history using Firestore?有没有办法使用 Firestore 创建更新历史记录?
【发布时间】:2021-10-30 12:31:03
【问题描述】:

数据结构

Categories
|
--- GfyBM6PaPugURNO3XY3s (Document)
    |
    --- Category Name (String)
    --- Last Update Of Sub Categories (Timestamp)
    --- Sub Categories (Sub Collection)
        |
        --- b6CmXCUuIiFM5wWhNNty (Document)
        --- c20P7Usnd7GUfPh8rI5l (Document)
        --- L9YS3HEq5lPYmkRDhEsH (Document)
        --- etc... to 37 documents
            |
            --- Sub Category Name (String)

我在类别集合中有 37 个子类别,管理员可以重命名任何子类别,但目前,我将此字段 Last Update Of Sub Categories (Timestamp) 本地值与在线值进行比较,如果比较不同,那么我将在本地删除所有子类别并再次从在线阅读子类别,这将花费 37 次阅读。

我需要什么?我需要阅读仅重命名的子类别,而不是阅读所有子类别,这将花费我 1 或 2 次阅读,具体取决于有多少更改。

有什么办法吗?

【问题讨论】:

  • 您为实现这一目标做了什么尝试?

标签: firebase google-cloud-firestore


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 2020-12-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-07-22
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多