node.js - 如何使用 node.js 代码在 Firestore 中创建集合

标签 node.js google-cloud-firestore

我不知道如何使用 node.js firestore api 创建新的集合。有什么建议吗?

最佳答案

当您向其中添加/写入文档时,会自动创建集合。不需要(也不是 API)显式创建集合。

来自documentation :

Collections and documents are created implicitly in Cloud Firestore. Simply assign data to a document within a collection. If either the collection or document does not exist, Cloud Firestore creates it.

关于node.js - 如何使用 node.js 代码在 Firestore 中创建集合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46623759/

相关文章:

javascript - Node.js、Jsdom、HttpAgent 的内存使用情况

node.js - 如何在防火墙后面处理 Socket.io 1.0 的粘性 session ?

java - 如何在 onBindViewHolder 中将查询到的数据分配给 String 或 int?

javascript - 如何为 firestore 中集合中的每个数据添加订阅?

android - Firebase 云消息传递 : Expiration of FCM token

java - 在 Angular4 中渲染缩略图

Ajax 使用 express 和 JQuery 刷新局部 View ?

javascript - 在 Passport.js 中验证多个模型

swift - 使用 Decodable 通过 Firestore 获取对象和文档 ID

firebase - 如何使复杂的 Firestore 规则适用于 map 和列表?