gpt4 book ai didi

firebase - 如何在同一项目中使用 Cloud Firestore 和实时数据库

转载 作者:行者123 更新时间:2023-12-02 19:21:58 30 4
gpt4 key购买 nike

Firebase 的文档包含 following paragraph :

Using Cloud Firestore and Realtime Database: You can use both databases within the same Firebase app or project. Both NoSQL databases can store the same types of data and the client libraries work in a similar manner. Keep in mind the differences outlined above if you decide to use both databases in your app.

不过,我找不到任何有关如何使用实时数据库将 Cloud Firestore 添加到现有项目的文档。我最终将升级到 Cloud Firestore,但在转换生产数据库之前需要一些时间进行试验和学习。

有人知道如何在同一个 Firebase 项目中使用这两个数据库吗?

最佳答案

当您在控制台中转到项目并选择数据库产品时,您应该第一次看到类似这样的内容:

enter image description here

这是一个选择器,可让您选择在项目中查看实时数据库或 Firestore。您可以使用此选择器在两者之​​间切换。

您第一次选择 Cloud Firestore 时,它​​会要求您进行配置。从“测试模式”开始,将内容设置为完全读写,无需身份验证,以便快速开始,但当然,您应该始终在生产中设置规则。

设置 Firestore 后,您应该能够使用两个客户端 SDK 独立访问两个数据库。

关于firebase - 如何在同一项目中使用 Cloud Firestore 和实时数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46720337/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com