Page MenuHomePhabricator

D5339.diff
No OneTemporary

D5339.diff

diff --git a/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h b/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h
--- a/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h
+++ b/native/cpp/CommonCpp/DatabaseManagers/DatabaseQueryExecutor.h
@@ -64,6 +64,8 @@
virtual void clearNotifyToken() const = 0;
virtual void setCurrentUserID(std::string userID) const = 0;
virtual std::string getCurrentUserID() const = 0;
+ virtual void setDeviceID(std::string deviceID) const = 0;
+ virtual std::string getDeviceID() const = 0;
virtual void clearSensitiveData() const = 0;
};
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
@@ -63,6 +63,8 @@
void clearNotifyToken() const override;
void setCurrentUserID(std::string userID) const override;
std::string getCurrentUserID() const override;
+ void setDeviceID(std::string deviceID) const override;
+ std::string getDeviceID() const override;
void clearSensitiveData() 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
@@ -914,6 +914,14 @@
return this->getMetadata("current_user_id");
}
+void SQLiteQueryExecutor::setDeviceID(std::string deviceID) const {
+ this->setMetadata("device_id", deviceID);
+};
+
+std::string SQLiteQueryExecutor::getDeviceID() const {
+ return this->getMetadata("device_id");
+};
+
void SQLiteQueryExecutor::setMetadata(std::string entry_name, std::string data)
const {
Metadata entry{

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 8:16 PM (41 m, 53 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2586057
Default Alt Text
D5339.diff (1 KB)

Event Timeline