Firestore:请求收集ID的列表 [英] Firestore: request for a list of collection IDs
问题描述
文档读取以外的查询
对于文档读取以外的查询(例如,要求收集ID的列表),将向您收费 阅读一份文件.如果获取完整的结果集 需要多个请求(例如,如果您正在使用 分页),则每个请求只向您收费一次.
我找不到有关如何执行此类查询的任何信息-仅获取ID.
有人知道吗?
您可以使用REST API获取集合ID.该文档位于此处 >
您还可以返回带有documentRef.getCollections()
的集合ID数组,详细说明此处
Queries other than document reads
For queries other than document reads, such as a request for a list of collection IDs, you are billed for one document read. If fetching the complete set of results requires more than one request (for example, if you are using pagination), you are billed once per request.
I can not find any information of how to perform such queries - to get only IDs.
Anyone knows how?
You can get the collection IDs using the REST API. The documentation is here
You can also return an array of collection IDs with documentRef.getCollections()
as detailed here
这篇关于Firestore:请求收集ID的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!