Page MenuHomePhabricator

[sqlite/native] Make C++ thread activity sqlite ops available to native
ClosedPublic

Authored by will on Apr 8 2024, 6:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 4:25 AM
Unknown Object (File)
Tue, Nov 12, 3: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 18 2024, 9:44 PM
Subscribers

Details

Summary

This makes the thread activity sqlite operations available on native

Test Plan

Ran the following code:

  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'],
      },
    },
  ]);
}

And received the correct data in the native sqlite table

Screenshot 2024-04-08 at 9.58.40 AM.png (491×622 px, 103 KB)

Depends on D11581

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will retitled this revision from [sqlite/native] Make thread activity sqlite ops available to native to [sqlite/native] Make C++ thread activity sqlite ops available to native.Apr 8 2024, 6:58 AM
will edited the test plan for this revision. (Show Details)
will edited the test plan for this revision. (Show Details)
Harbormaster returned this revision to the author for changes because remote builds failed.Apr 8 2024, 7:35 AM
Harbormaster failed remote builds in B28060: Diff 38910!
will requested review of this revision.Apr 9 2024, 10:26 AM
kamil added inline comments.
native/cpp/CommonCpp/NativeModules/PersistentStorageUtilities/DataStores/ThreadActivityStore.h
33 ↗(On Diff #38951)

you can add new line here

This revision is now accepted and ready to land.Apr 10 2024, 5:38 AM