Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3357281
D12794.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12794.diff
View Options
diff --git a/native/cpp/CommonCpp/NativeModules/MessageSearchStoreOperations.h b/native/cpp/CommonCpp/NativeModules/MessageSearchStoreOperations.h
new file mode 100644
--- /dev/null
+++ b/native/cpp/CommonCpp/NativeModules/MessageSearchStoreOperations.h
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "DBOperationBase.h"
+#include "DatabaseManager.h"
+#include <jsi/jsi.h>
+
+namespace comm {
+
+namespace jsi = facebook::jsi;
+
+class UpdateMessageSearchIndexOperation : public DBOperationBase {
+public:
+ UpdateMessageSearchIndexOperation(
+ jsi::Runtime &rt,
+ const jsi::Object &payload)
+ : originalMessageID{payload.getProperty(rt, "originalMessageID")
+ .asString(rt)
+ .utf8(rt)},
+ messageID{payload.getProperty(rt, "messageID").asString(rt).utf8(rt)},
+ content{payload.getProperty(rt, "content").asString(rt).utf8(rt)} {
+ }
+
+ virtual void execute() override {
+ DatabaseManager::getQueryExecutor().updateMessageSearchIndex(
+ this->originalMessageID, this->messageID, this->content);
+ }
+
+private:
+ std::string originalMessageID;
+ std::string messageID;
+ std::string content;
+};
+
+} // namespace comm
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 11:21 PM (21 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2577601
Default Alt Text
D12794.diff (1 KB)
Attached To
Mode
D12794: [native] Add MessageSearchStoreOperations
Attached
Detach File
Event Timeline
Log In to Comment