在 firebase 中, db.collection().where() 是怎么做的?
In firebase how does the db.collection().where() does?
谈到在 Firestore 上查询,我找到了 collection().where()
函数。
如果我能获得一些有关此 .where()
函数如何工作的语法的有用信息,那将是一个很大的帮助。
在教程中找到类似的内容。
const userExist = db.collection('data').where('users', 'array-contains', user.email);
上面的代码是如何工作的?
帮助将不胜感激。
您问题中的查询将 return data
集合中存在的所有文档,其中名为 users
的数组 属性 包含一封电子邮件,等于什么 user.email
returns.
谈到在 Firestore 上查询,我找到了 collection().where()
函数。
如果我能获得一些有关此 .where()
函数如何工作的语法的有用信息,那将是一个很大的帮助。
在教程中找到类似的内容。
const userExist = db.collection('data').where('users', 'array-contains', user.email);
上面的代码是如何工作的? 帮助将不胜感激。
您问题中的查询将 return data
集合中存在的所有文档,其中名为 users
的数组 属性 包含一封电子邮件,等于什么 user.email
returns.