云开发工具,数据库的高级操作,then语句报错,这是啥情况?

发布于 8 年前作者 lei6110400 次浏览最后编辑 8 年前来自 ask

db.collection(‘user’)

.where({

tel: ‘123456’,

del: ‘n’

}).get().then(res => {

console.log(res)

})

untimeError: cannot get property ‘then’

不支持then么,Promise

1 回复
guiyingzhu
guiyingzhu1 楼6 年前

你说的高级操作应该是数据库脚本,不是Promise:https://developers.weixin.qq.com/miniprogram/dev/wxcloud/guide/database/dbscript.html