Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32098236
D15403.1765011386.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15403.1765011386.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D15403: [native] add setting connection manager to restored database on each access
Attached
Detach File
Event Timeline
Log In to Comment