本文整理自网络,侵删。
Collection.where
指定筛选条件
方法签名如下:
function where(rule: object): Query
方法接受一个必填对象参数 rule,用于定义筛选条件
示例代码
找出未完成的进度 50 的待办事项:
const db = wx.cloud.database()
db.collection('todos').where({
done: false,
progress: 50
})
.get({
success: console.log,
fail: console.error
})
标签:微信小程序
相关阅读 >>
更多相关阅读请进入《微信小程序》频道 >>
Vue.js 设计与实现 基于Vue.js 3 深入解析Vue.js 设计细节
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者