提交 68b0653c 编写于 作者: 雪洛's avatar 雪洛

feat: 调整multiSend测试例

上级 7bf10262
......@@ -293,9 +293,16 @@
db.multiSend(temp1, temp2)
.then<void>(res => {
uni.hideLoading()
const successCount = res.dataList.filter((item: UniCloudDBMultiSendResultItem) : boolean => {
return item.errCode == 0
}).length
let successCount = 0
for (let i = 0; i < res.dataList.length; i++) {
const item = res.dataList[i]
if(item.errCode == 0) {
console.log(`第${i}个请求查询到${item.data!.length}条数据`)
successCount++
} else {
console.error(`第${i}个请求查询失败,错误信息:${item.data!.length}`)
}
}
this.multiSendSuccessCount = successCount
this.notify(`合并查询成功,成功查询的语句条数为:${successCount}`, '提示')
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册