【问题标题】:flutter firebase is there any query to make OR query on fields?flutter firebase 是否有任何查询可以对字段进行 OR 查询?
【发布时间】:2021-07-24 10:22:59
【问题描述】:

这是我的直播:

stream: chatRef
          .where('id', isEqualTo: this.currentUserId)
          .orderBy('timeStamp', descending: true)
          .snapshots(),

我想查询 'id 等于 this.currentUserId 或 'otherId' 等于 this.currentUserId 但我找不到简单的方法...

【问题讨论】:

    标签: firebase flutter stream where-clause


    【解决方案1】:

    试试这个。

    .where('id', whereIn: [this.currentUserId, otherId])
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-25
      相关资源
      最近更新 更多