【发布时间】:2020-04-12 09:13:00
【问题描述】:
在 Cloud Foreshore 的this 文档中提到“请求收集 ID 列表,您需要为读取一个文档付费。”
现在我在我的项目中使用 AngularFire 和 Ionic3。我的要求是从具有 where 条件的集合中获取 仅集合 ID。如果我执行以下操作,我将花费我的读取次数 = 结果中的文档数。
let snap = this.afs.collection('path').ref
.where('field', "==",'data').get();
snap.forEach(x => {
list.push(x.id);
});
我无法使用我在几个地方找到的方法getCollections() 作为解决方案。
如果您有解决方案,请告诉我。
【问题讨论】:
标签: firebase ionic-framework google-cloud-firestore angularfire