【问题标题】:How to use nesting similar to firestore for google datastore?如何为谷歌数据存储使用类似于firestore的嵌套?
【发布时间】:2021-11-24 11:07:33
【问题描述】:

我之前与firestore 合作过,我们可以将documents 保存在集合中,并将集合保存在文档中。 google datastore kind类似于collection,entity类似于document,怎么把kind放在kind里面?

对于火库

collection
   - document
     - collection
       - document
         .... so on

Google Datastore如何做到这一点?

kind
   - entity
     - kind
       - entity
         .... so on

【问题讨论】:

    标签: python google-cloud-platform google-cloud-datastore


    【解决方案1】:

    Datastore 的文档很不错

    Ancestor paths 上的文档开始,了解父实体和子实体。

    确保您在构建数据库时了解 Datastore 中存在的权衡取舍。见Limits

    根据您的语言|运行时,有一些工具(如用于 Python3 的 ndb)提供对 Datastore 的抽象。我没有使用过这些,但 ndb 曾经在 App Engine 开发人员(使用 Datastore)中非常流行,这些可能会抽象出处理 Datastore 中的实体的一些复杂性。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-16
      • 2014-10-16
      • 2019-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多