Firestore和Vue.js多个Where子句[重复]

问题描述 投票:0回答:1

这个问题在这里已有答案:

我需要使用多个where子句运行查询,但我的查询忽略它们。我已经在线查看,无法找到适合我需求的示例。这是我目前使用的代码。任何和所有的帮助总是受到赞赏。

let codeRef = db.collection('codes')
    codeRef.where('code', '==', this.code)
    codeRef.where('gid', '==', this.gid)
    codeRef.get().then(snapshot => { ...
javascript firebase google-cloud-firestore
1个回答
1
投票

你尝试过它们吗?

let codeRef = db.collection('codes')
              .where('code','==',this.code)
              .where('gid','==',this.gid)
              .get()
© www.soinside.com 2019 - 2024. All rights reserved.