Page MenuHomePhabricator

[sqlite] Implement C++ code for native to get sqlite thread activity entries
ClosedPublic

Authored by will on Tue, Apr 9, 10:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 3:31 PM
Unknown Object (File)
Fri, Apr 26, 11:56 AM
Unknown Object (File)
Mon, Apr 22, 3:25 AM
Unknown Object (File)
Tue, Apr 16, 10:26 PM
Unknown Object (File)
Mon, Apr 15, 6:05 PM
Unknown Object (File)
Mon, Apr 15, 1:25 PM
Unknown Object (File)
Sat, Apr 13, 7:41 PM
Unknown Object (File)
Sat, Apr 13, 12:24 AM
Subscribers

Details

Summary

This implements C++ code to allow native to get sqlite thread activity entries

Depends on D11584

Test Plan

Ran the following code and console logged the thread activity store successfully:

let data = await commCoreModule.getClientDBStore();
console.log(data.threadActivityEntries);

await commCoreModule.processThreadActivityStoreOperations([
  {
    type: 'replace_thread_activity_entry',
    payload: {
      id: 'test_A_id',
      threadActivityStoreEntry: JSON.stringify({
        lastNavigatedTo: 1,
        lastPruned: 2,
      }),
    },
  },
  {
    type: 'remove_all_thread_activity_entries',
  },
  {
    type: 'replace_thread_activity_entry',
    payload: {
      id: 'test_B_id',
      threadActivityStoreEntry: JSON.stringify({
        lastNavigatedTo: 3,
        lastPruned: 4,
      }),
    },
  },
  {
    type: 'replace_thread_activity_entry',
    payload: {
      id: 'test_C_id',
      threadActivityStoreEntry: JSON.stringify({
        lastNavigatedTo: 5,
        lastPruned: 6,
      }),
    },
  },
  {
    type: 'remove_thread_activity_entries',
    payload: {
      ids: ['test_B_id'],
    },
  },
]);

data = await commCoreModule.getClientDBStore();
console.log(data.threadActivityEntries);

Screenshot 2024-04-10 at 1.55.43 AM.png (156×826 px, 22 KB)

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 summary of this revision. (Show Details)
will requested review of this revision.Tue, Apr 9, 11:10 PM
This revision is now accepted and ready to land.Wed, Apr 10, 5:40 AM
will edited the summary of this revision. (Show Details)

thread_activity_store_entry => threadActivityStoreEntry