Page MenuHomePhorge

D15403.1765011386.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D15403.1765011386.diff

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
@@ -51,6 +51,8 @@
thread_local SQLiteQueryExecutor restoredQueryExecutor(
DatabaseManager::restoredConnectionManager, true);
+ restoredQueryExecutor.setConnectionManager(
+ DatabaseManager::restoredConnectionManager);
return restoredQueryExecutor;
}
diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
@@ -37,6 +37,8 @@
bool skipMigration = false);
~SQLiteQueryExecutor();
+ void setConnectionManager(
+ std::shared_ptr<SQLiteConnectionManager> connectionManager);
void migrate() const override;
std::unique_ptr<Thread> getThread(std::string threadID) const override;
diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
@@ -80,6 +80,11 @@
}
}
+void SQLiteQueryExecutor::setConnectionManager(
+ std::shared_ptr<SQLiteConnectionManager> connectionManager) {
+ this->connectionManager = std::move(connectionManager);
+}
+
sqlite3 *SQLiteQueryExecutor::getConnection() const {
this->connectionManager->initializeConnection();
return this->connectionManager->getConnection();

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 6, 8:56 AM (14 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5834812
Default Alt Text
D15403.1765011386.diff (1 KB)

Event Timeline