Page MenuHomePhabricator

[sqlite] Implement C++ message store local ops
ClosedPublic

Authored by will on Thu, May 30, 8:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jun 21, 6:25 AM
Unknown Object (File)
Thu, Jun 20, 3:57 PM
Unknown Object (File)
Thu, Jun 20, 7:56 AM
Unknown Object (File)
Thu, Jun 20, 5:00 AM
Unknown Object (File)
Wed, Jun 19, 11:47 AM
Unknown Object (File)
Tue, Jun 18, 12:16 AM
Unknown Object (File)
Tue, Jun 18, 12:16 AM
Unknown Object (File)
Tue, Jun 18, 12:16 AM
Subscribers

Details

Summary

Introduces code allowing native to use sqlite message store local ops

Depends on D12248

Test Plan

Tested further in stack. Ran the following code:

let data = await commCoreModule.getClientDBStore();

await commCoreModule.processDBStoreOperations({
  messageStoreOperations: [
  {
    type: 'replace_local_message_info',
    payload: {
      id: '1',
      localMessageInfo: JSON.stringify({
        sendFailed: "1",
      }),
    }
  },
  {
    type: 'replace_local_message_info',
    payload: {
      id: '2',
      localMessageInfo: JSON.stringify({
        sendFailed: "0",
      }),
    }
  },
  {
    type: 'remove_local_message_infos',
    payload: {
      ids: ['1'],
    }
  },
]});

And confirmed correct result

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will edited the test plan for this revision. (Show Details)
will edited the test plan for this revision. (Show Details)
will requested review of this revision.Thu, May 30, 8:33 AM
tomek added inline comments.
native/cpp/CommonCpp/NativeModules/PersistentStorageUtilities/DataStores/MessageStore.cpp
103–107 ↗(On Diff #40778)

The name of the operation seems inconsistent with the name of a class. Shouldn't all the ops include STORE in their names? But it also seems that we took the same approach for threads - so maybe just keep it?

110–138 ↗(On Diff #40778)

Can we make the newlines consistent for all the ifs?

This revision is now accepted and ready to land.Mon, Jun 3, 4:35 AM
native/cpp/CommonCpp/NativeModules/PersistentStorageUtilities/DataStores/MessageStore.cpp
103–107 ↗(On Diff #40778)

Yeah. That makes sense. I believe I was originally following the naming convention of threads. Perhaps if we've decided on this convention, I can modify this diff to include STORE and include a diff that renames our thread operations?

native/cpp/CommonCpp/NativeModules/PersistentStorageUtilities/DataStores/MessageStore.cpp
103–107 ↗(On Diff #40778)

That would be great!

native/cpp/CommonCpp/NativeModules/PersistentStorageUtilities/DataStores/MessageStore.cpp
103–107 ↗(On Diff #40778)
This revision was landed with ongoing or failed builds.Mon, Jun 10, 5:11 AM
This revision was automatically updated to reflect the committed changes.