Fetching all collections in Firestore

2019-01-08 01:35发布

问题:

I am using Firestore in my project, so i want to show all collection names in my project.

Is it posible to get all collection names from Firebase project.

Thanks..

回答1:

There are limited public APIs to get a list of top-level collections. Mobile clients (Android, iOS, web) have no API. Node.js admin clients have getCollections() on Firestore to get that list.

If you want to get a list on any platform, you should maintain that list yourself in a known collection inside a known document id.