Firestore: request for a list of collection IDs

2019-02-27 00:06发布

Firestore documentation says:

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?

1条回答
三岁会撩人
2楼-- · 2019-02-27 00:42

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

查看更多
登录 后发表回答