Page MenuHomePhabricator

D5339.id17478.diff
No OneTemporary

D5339.id17478.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
@@ -893,6 +893,14 @@
return this->getMetadata("current_user_id");
}
+void SQLiteQueryExecutor::setDeviceID(std::string deviceID) const {
+ setMetadata("device_id", deviceID);
+};
+
+std::string SQLiteQueryExecutor::getDeviceID() const {
+ return getMetadata("device_id");
+};
+
void SQLiteQueryExecutor::setMetadata(std::string entry_name, std::string data)
const {
Metadata entry{

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 2:11 AM (17 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2603307
Default Alt Text
D5339.id17478.diff (1 KB)

Event Timeline