我的数据库中的json示例
请求
firestore()
.collection(COLLECTION)
.where("types", ">=", 'lDQJJnsq2osTIWCPLMRg')
.get()
.then(querySnapshot => {
const arr = []
querySnapshot.forEach(documentSnapshot => {
const data = documentSnapshot.data()
const el = {id: documentSnapshot.id, ...data}
arr.push(el)
})
resolve(arr)
})
.catch(err => {
console.log('err ', err )
reject()
});
如果属性类型包含特定于id的属性类型,则无法找到如何在映射(‘
我从反应开始-本土化和火基,所以感谢你的帮助。
发布于 2021-12-02 19:21:16
对于分页查询,需要使用查询游标:https://firebase.google.com/docs/firestore/query-data/query-cursors
https://stackoverflow.com/questions/70209085
复制相似问题