Page MenuHomePhabricator

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

Authored by will on Mon, Apr 8, 6:51 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 7:17 PM
Unknown Object (File)
Fri, Apr 26, 12:57 PM
Unknown Object (File)
Mon, Apr 22, 7:14 AM
Unknown Object (File)
Wed, Apr 17, 4:45 AM
Unknown Object (File)
Tue, Apr 16, 1:47 PM
Unknown Object (File)
Tue, Apr 16, 11:21 AM
Unknown Object (File)
Tue, Apr 16, 5:08 AM
Unknown Object (File)
Mon, Apr 15, 12:24 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.Mon, Apr 8, 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.Mon, Apr 8, 7:35 AM
Harbormaster failed remote builds in B28060: Diff 38910!
will requested review of this revision.Tue, Apr 9, 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.Wed, Apr 10, 5:38 AM