From b17e784c194c408f7443a7443b7eddc88c5acfa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E4=BA=9A=E7=90=AA?= Date: Tue, 7 May 2024 20:53:26 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=20=E6=96=B0=E5=A2=9EuniCloud=20?= =?UTF-8?q?database=20multiSend=E6=96=B9=E6=B3=95"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 7bf102629fbb747a1d0c4b22ce1db6b02d0a382f. --- .../unicloud-database.test.js | 3 --- .../unicloud-database/unicloud-database.uvue | 27 ------------------- 2 files changed, 30 deletions(-) diff --git a/pages/API/unicloud-database/unicloud-database.test.js b/pages/API/unicloud-database/unicloud-database.test.js index cec19a63..80855554 100644 --- a/pages/API/unicloud-database/unicloud-database.test.js +++ b/pages/API/unicloud-database/unicloud-database.test.js @@ -17,7 +17,6 @@ describe('unicloud-database', () => { await page.callMethod('dbGetWithCommand') await page.callMethod('dbUpdate') await page.callMethod('dbRemove') - await page.callMethod('dbMultiSend') const { addId, @@ -27,7 +26,6 @@ describe('unicloud-database', () => { getData, getWithCommandData, removeDeleted, - multiSendSuccessCount, } = await page.data() expect(addId !== '').toBe(true) @@ -37,7 +35,6 @@ describe('unicloud-database', () => { expect(getWithCommandData.length).toBe(1) expect(updateUpdated).toBe(3) expect(removeDeleted).toBe(3) - expect(multiSendSuccessCount).toBe(2) }) diff --git a/pages/API/unicloud-database/unicloud-database.uvue b/pages/API/unicloud-database/unicloud-database.uvue index ce321e79..aeb650c1 100644 --- a/pages/API/unicloud-database/unicloud-database.uvue +++ b/pages/API/unicloud-database/unicloud-database.uvue @@ -35,7 +35,6 @@ getWithCommandData: [] as Array, removeDeleted: 0, lookupData: [] as Array, - multiSendSuccessCount: 0, isUniTest: false } }, @@ -279,32 +278,6 @@ const error = err as UniCloudError this.notify(error.errMsg, '错误') }) - }, - dbMultiSend() { - const db = uniCloud.databaseForJQL() - const temp1 = db.collection('type') - .where( - 'tag == "default-tag"' - ).getTemp() - const temp2 = db.collection('type') - .where( - 'tag == "default-tag"' - ).getTemp() - db.multiSend(temp1, temp2) - .then(res => { - uni.hideLoading() - const successCount = res.dataList.filter((item: UniCloudDBMultiSendResultItem) : boolean => { - return item.errCode == 0 - }).length - this.multiSendSuccessCount = successCount - this.notify(`合并查询成功,成功查询的语句条数为:${successCount}`, '提示') - }) - .catch((err : any | null) => { - uni.hideLoading() - const error = err as UniCloudError - console.error(err) - this.notify(error.errMsg, '错误') - }) } } } -- GitLab