diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/executor/document/check_common.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd/src/executor/document/check_common.cpp index 8b17915985e9a29cde9706665278d851f0978ad3..e4af38a11e9946aead164b1a673f693ee652f5a7 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/executor/document/check_common.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/executor/document/check_common.cpp @@ -109,10 +109,10 @@ int CheckCommon::CheckFilter(JsonObject &filterObj, std::vector> &filterPath, bool &isIdExist); - static int CheckIdFormat(JsonObject &data, bool &isIdExisit); + static int CheckFilter(JsonObject &filterObj, std::vector> &filterPath, bool &isIdExist); + static int CheckIdFormat(JsonObject &idObj, bool &isIdExisit); static int CheckDocument(JsonObject &document, bool &isIdExist); static int CheckUpdata(JsonObject &updataObj); static int CheckProjection(JsonObject &projectionObj, std::vector> &path); diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set.cpp index dd28c02696ac13e20c6ee42e6a5bd0fddbde028c..d537dd0ebb02b45c04ec52cacb5168bfbeeb7bbd 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set.cpp @@ -14,8 +14,6 @@ */ #include "result_set.h" -#include - #include "db_constant.h" #include "document_key.h" #include "log_print.h" @@ -222,7 +220,7 @@ JsonObject CreatIdObj(const std::string &idStr, int errCode) return idObj; } -int InsertId(JsonObject &cjsonObj, std::string &jsonKey) +int InsertId(JsonObject &cjsonObj, const std::string &jsonKey) { if (jsonKey.empty()) { GLOGE("Genalral Id faild"); diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/oh_adapter/src/sqlite_store_executor_impl.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd/src/oh_adapter/src/sqlite_store_executor_impl.cpp index 39f34788a33f9b509b93761963f7a0aa9b082234..6750b9b5f6c2e873bf09681ee5931bed7a4ed44e 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/oh_adapter/src/sqlite_store_executor_impl.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/oh_adapter/src/sqlite_store_executor_impl.cpp @@ -226,7 +226,7 @@ std::string GeneralInsertSql(const std::string &collName, Key &key, int isIdExis } } -void AssignValueToData(std::string &keyStr, std::string &valueStr, std::pair &values, +void AssignValueToData(std::string &keyStr, const std::string &valueStr, std::pair &values, int &innerErrorCode, bool &isMatchOneData) { keyStr.pop_back(); // get id from really key.