微信小程序云开发command字段操作符和数组操作符
发布时间
阅读量:
阅读量
记录 2020-07-28
字段操作符
exits
使用方式 time:_.exists(true) 可用于筛选包含time字段的记录,需要注意的是调试版本需为2.8及以上
推荐选择用户使用比例最高的版本
db.collection("demolist")
.where({
time:_.exists(true)
})
.get()
.then(res=>{
console.log(res);
this.setData({
dataList:res.data
})
})
},
mod 取余 不作讲解
数组操作符
size
筛选出数组长度与给定size相匹配的数据项,进而提取其内容
从数组tabs中检索出长度为4的条目并予以返回
db.collection("demolist")
.where({
tabs:_.siz
全部评论 (0)
还没有任何评论哟~
