Page MenuHomePhabricator

D8551.id29114.diff
No OneTemporary

D8551.id29114.diff

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
@@ -26,6 +26,7 @@
static std::string encryptionKey;
SQLiteQueryExecutor();
+ SQLiteQueryExecutor(std::string sqliteFilePath);
std::unique_ptr<Thread> getThread(std::string threadID) const override;
std::string getDraft(std::string key) const override;
void updateDraft(std::string key, std::string text) 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
@@ -939,6 +939,11 @@
SQLiteQueryExecutor::migrate();
}
+SQLiteQueryExecutor::SQLiteQueryExecutor(std::string sqliteFilePath) {
+ SQLiteQueryExecutor::sqliteFilePath = sqliteFilePath;
+ SQLiteQueryExecutor::migrate();
+}
+
std::string SQLiteQueryExecutor::getDraft(std::string key) const {
std::unique_ptr<Draft> draft =
SQLiteQueryExecutor::getStorage().get_pointer<Draft>(key);

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 8:27 AM (21 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2600268
Default Alt Text
D8551.id29114.diff (1 KB)

Event Timeline