From d9ea6d50390b8e7d84acfaffacc46206bac48f69 Mon Sep 17 00:00:00 2001 From: SimpleLove520 <1960997571@qq.com> Date: Wed, 4 Sep 2024 22:14:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=A3=80=E6=9F=A5=E8=A1=A8?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: SimpleLove520 <1960997571@qq.com> --- .../flutter/plugins/sqflite/SqflitePlugin.ets | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/sqflite/ohos/src/main/ets/io/flutter/plugins/sqflite/SqflitePlugin.ets b/sqflite/ohos/src/main/ets/io/flutter/plugins/sqflite/SqflitePlugin.ets index 8ee7ad1..3aacece 100644 --- a/sqflite/ohos/src/main/ets/io/flutter/plugins/sqflite/SqflitePlugin.ets +++ b/sqflite/ohos/src/main/ets/io/flutter/plugins/sqflite/SqflitePlugin.ets @@ -186,17 +186,6 @@ export default class SqflitePlugin extends SqfliteApi implements FlutterPlugin, return; } - let sql: string = call.argument(Constant.PARAM_SQL); - let dataBaseId: number = call.argument(Constant.PARAM_ID); - let databaseName: string = SqfLiteHelper.dBIdList.get(dataBaseId) as string; - let tableName: string = SqlHelper.getInsertSqlTableName(sql); - - let tableExisted = await SqfLiteHelper.checkTable(databaseName, tableName); - if(tableName.length > 0 && !tableExisted) { - result.error(Constant.SQLITE_ERROR, 'no such table:' + tableName, ''); - return; - } - let operation: MethodCallOperation = new MethodCallOperation(call, result); Database.insert(operation, rdbStore); } @@ -209,17 +198,6 @@ export default class SqflitePlugin extends SqfliteApi implements FlutterPlugin, return; } - let sql: string = call.argument(Constant.PARAM_SQL); - let dataBaseId: number = call.argument(Constant.PARAM_ID); - let databaseName: string = SqfLiteHelper.dBIdList.get(dataBaseId) as string; - let tableName: string = SqlHelper.getQuerySqlTableName(sql); - - let tableExisted = await SqfLiteHelper.checkTable(databaseName, tableName); - if(tableName.length > 0 && !tableExisted) { - result.error(Constant.SQLITE_ERROR, 'no such table:' + tableName, ''); - return; - } - let operation: MethodCallOperation = new MethodCallOperation(call, result); Database.query(operation, rdbStore); } @@ -231,17 +209,6 @@ export default class SqflitePlugin extends SqfliteApi implements FlutterPlugin, return; } - let sql: string = call.argument(Constant.PARAM_SQL); - let dataBaseId: number = call.argument(Constant.PARAM_ID); - let databaseName: string = SqfLiteHelper.dBIdList.get(dataBaseId) as string; - let tableName: string = SqlHelper.getUpdateSqlTableName(sql); - - let tableExisted = await SqfLiteHelper.checkTable(databaseName, tableName); - if(tableName.length > 0 && !tableExisted) { - result.error(Constant.SQLITE_ERROR, 'no such table:' + tableName, ''); - return; - } - let operation: MethodCallOperation = new MethodCallOperation(call, result); Database.update(operation, rdbStore); } -- Gitee