diff --git a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h --- a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h +++ b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.h @@ -9,6 +9,7 @@ class DatabaseManager { public: static const DatabaseQueryExecutor &getQueryExecutor(); + static void clearSensitiveData(); }; } // namespace comm diff --git a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp --- a/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp +++ b/native/cpp/CommonCpp/DatabaseManagers/DatabaseManager.cpp @@ -10,4 +10,8 @@ return instance; } +void DatabaseManager::clearSensitiveData() { + SQLiteQueryExecutor::clearSensitiveData(); +} + } // namespace comm diff --git a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp --- a/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp +++ b/native/cpp/CommonCpp/NativeModules/CommCoreModule.cpp @@ -1044,7 +1044,7 @@ taskType job = [this, promise]() { std::string error; try { - SQLiteQueryExecutor::clearSensitiveData(); + DatabaseManager::clearSensitiveData(); } catch (const std::exception &e) { error = e.what(); }