相关疑难解决方法(0)

Firestore:多个条件where子句

例如,我的书籍列表中有动态过滤器,我可以设置特定的颜色,作者和类别.此过滤器可以一次设置多种颜色和多个类别.

   Book > Red, Blue > Adventure, Detective.
Run Code Online (Sandbox Code Playgroud)

如何有条件地添加"where"?

  firebase
    .firestore()
    .collection("book")
    .where("category", "==", )
    .where("color", "==", )
    .where("author", "==", )

    .orderBy("date")
    .get()
    .then(querySnapshot => {...
Run Code Online (Sandbox Code Playgroud)

javascript firebase google-cloud-firestore

12
推荐指数
4
解决办法
8554
查看次数