我是NoSQL的新手,所以我不知道我的问题是否可能,这是我的问题。我有一个DocumentReference(或ID)列表,我想在firestore上进行查询,以便在一个请求中获取所有文档。
我设法用一个forloop来做到这一点,但是它正在读很多我的firestore ...而且我不知道是否将集合的所有文档都收集起来并过滤List是一个好习惯。
我使用flutter和cloud_firestore(0.8.2)插件。
最佳答案
Here you can use this code to get all the document in Firestore.
Firestore _myStore = Firestore.instance;
_myStore.collection('users').document('${user.uid}').setData({
"Email": _emailAddress.text.toLowerCase(),
"Name": _userName.text,
'Role': 'user',
'Created': FieldValue.serverTimestamp(),
});
关于dart - 用多个引用查询。 Firestore- flutter ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54861652/