从 firebase 数据库中获取所有集合名称

时间:2021-02-24 20:21:40

标签: firebase firebase-realtime-database google-cloud-firestore firebase-authentication

我想知道使用 js 的 firebase 数据库的所有集合名称,但仍然没有任何解决方案。

我试过了

db.collection().get().then(()=>{})

但是它给了我一个错误,必须在集合中写集合名称

1 个答案:

答案 0 :(得分:1)

Admin API 让你做到这一点

/start token

有关更多详细信息,请参阅此线程: Fetching all collections in Firestore