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 8ee7ad109d39d90ab3854b5ba7040878dbadd54d..3aacece8ed1d62c790293589a02021a177a6d9ef 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); }