diff --git a/frameworks/native/rdb/include/rdb_store_impl.h b/frameworks/native/rdb/include/rdb_store_impl.h index a1962b02e..fc20f175a 100644 --- a/frameworks/native/rdb/include/rdb_store_impl.h +++ b/frameworks/native/rdb/include/rdb_store_impl.h @@ -234,7 +234,7 @@ private: int RegisterDataChangeCallback(); void InitDelayNotifier(); bool ColHasSpecificField(const std::vector &columns); - std::pair CreateStatementForBackup(const std::string &sql); + std::pair CreateWriteableStmt(const std::string &sql); std::pair GetStatement(const std::string& sql, std::shared_ptr conn) const; std::pair GetStatement(const std::string& sql, bool read = false) const; int AttachInner(const std::string &attachName, diff --git a/frameworks/native/rdb/mock/include/rdb_store_impl.h b/frameworks/native/rdb/mock/include/rdb_store_impl.h index 18ae28d5a..67056e277 100644 --- a/frameworks/native/rdb/mock/include/rdb_store_impl.h +++ b/frameworks/native/rdb/mock/include/rdb_store_impl.h @@ -126,7 +126,7 @@ private: void DoCloudSync(const std::string &table); int InnerBackup(const std::string& databasePath, const std::vector& destEncryptKey = std::vector()); - std::pair CreateStatementForBackup(const std::string &sql); + std::pair CreateWriteableStmt(const std::string &sql); std::pair GetStatement(const std::string& sql, std::shared_ptr conn) const; std::pair GetStatement(const std::string& sql, bool read = false) const; int AttachInner(const std::string &attachName, diff --git a/frameworks/native/rdb/src/rdb_store_impl.cpp b/frameworks/native/rdb/src/rdb_store_impl.cpp index 31adec819..69596805c 100644 --- a/frameworks/native/rdb/src/rdb_store_impl.cpp +++ b/frameworks/native/rdb/src/rdb_store_impl.cpp @@ -1163,7 +1163,7 @@ int RdbStoreImpl::InnerBackup(const std::string &databasePath, const std::vector return conn == nullptr ? E_BASE : conn->Backup(databasePath, {}, false, slaveStatus_); } - auto [errCode, statement] = CreateStatementForBackup(GlobalExpr::CIPHER_DEFAULT_ATTACH_HMAC_ALGO); + auto [errCode, statement] = CreateWriteableStmt(GlobalExpr::CIPHER_DEFAULT_ATTACH_HMAC_ALGO); if (errCode != E_OK || statement == nullptr) { return errCode; } @@ -2423,7 +2423,7 @@ int32_t RdbStoreImpl::UnlockCloudContainer() } #endif -std::pair> RdbStoreImpl::CreateStatementForBackup(const std::string &sql) +std::pair> RdbStoreImpl::CreateWriteableStmt(const std::string &sql) { auto config = config_; config.SetHaMode(HAMode::SINGLE);