HomePhabricator
Diffusion Comm 7760faea083c

[sqlite] implement processing aux user store ops on worker

Description

[sqlite] implement processing aux user store ops on worker

Summary:
Implements processing of aux user store ops by shared worker

Depends on D11510

Test Plan:
Ran the following code and confirmed web database had expected results:

await sharedWorker.schedule({
  type: workerRequestMessageTypes.PROCESS_STORE_OPERATIONS,
  storeOperations: {
    auxUserStoreOperations: [
      {
        type: 'replace_aux_user_info',
        payload: {
          id: 'worker_test_A_id',
          auxUserInfo: 'worker_test_A_data',
        },
      },
      {
        type: 'replace_aux_user_info',
        payload: {
          id: 'worker_test_B_id',
          auxUserInfo: 'worker_test_B_update',
        },
      },
      {
        type: 'replace_aux_user_info',
        payload: {
          id: 'worker_test_A_id',
          auxUserInfo: 'worker_test_A_update',
        },
      },
      {
        type: 'remove_aux_user_infos',
        payload: {
          ids: ['worker_test_B_id'],
        },
      },
    ],
  },
});

const response = await sharedWorker.schedule({
  type: workerRequestMessageTypes.GET_DB_FILE,
});

Screenshot 2024-04-01 at 2.32.07 AM.png (427×709 px, 89 KB)

Reviewers: ginsu, kamil, atul

Reviewed By: kamil

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D11511

Details

Provenance
willAuthored on Apr 2 2024, 6:29 PM
Reviewer
kamil
Differential Revision
D11511: [sqlite] implement processing aux user store ops on worker
Parents
rCOMMd30fd946950c: [sqlite] Implement C++ for native to get all aux user infos
Branches
Unknown
Tags
Unknown