【发布时间】:2022-01-19 22:52:58
【问题描述】:
我想根据两个 where 子句查询我的 Firestore 数据。
首先是spaceId == someString,其次是字段ìsDeleted == false。
我已经可以找到一个带有 where 子句的解决方案。但是,我找不到任何关于如何使用多个 where 子句进行查询的教程或文档,尤其是对于 Firebase 版本 7.24.0。
有人知道如何解决这个问题吗?
代码如下:
this.activities = this.angularFirestore
.collection("accounts")
.doc(this.userId)
.collection("activities", (ref) =>
ref.where("spaceId", "==", this.spaceId)
)
.valueChanges();
【问题讨论】:
标签: node.js angular typescript firebase google-cloud-firestore