我想根據兩個 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();
uj5u.com熱心網友回復:
您可以只鏈接where呼叫,因此:
ref.where("spaceId", "==", this.spaceId)
.where("isDeleted", "==", false)
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/383517.html
標籤:节点.js 有角的 打字稿 火力基地 谷歌云firestore
上一篇:具有useFormContext和自定義標記的型別“IntrinsicAttributes”上不存在屬性
下一篇:TS:null不是陣列型別
