Page MenuHomePhabricator

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

Authored by will on Apr 9 2024, 10:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 31, 7:38 PM
Unknown Object (File)
Oct 28 2024, 6:48 PM
Unknown Object (File)
Oct 25 2024, 1:18 AM
Unknown Object (File)
Oct 18 2024, 9:44 PM
Unknown Object (File)
Oct 18 2024, 9:44 PM
Unknown Object (File)
Oct 18 2024, 9:44 PM
Unknown Object (File)
Oct 2 2024, 12:19 PM
Unknown Object (File)
Sep 24 2024, 2:09 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.Apr 9 2024, 11:10 PM
This revision is now accepted and ready to land.Apr 10 2024, 5:40 AM
will edited the summary of this revision. (Show Details)

thread_activity_store_entry => threadActivityStoreEntry