Page MenuHomePhabricator

[sqlite] Implement C++ for native to get all aux user infos
ClosedPublic

Authored by will on Mar 31 2024, 11:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 12 2024, 7:06 AM
Unknown Object (File)
Apr 11 2024, 7:03 AM
Unknown Object (File)
Apr 11 2024, 6:05 AM
Unknown Object (File)
Apr 10 2024, 8:44 AM
Unknown Object (File)
Apr 8 2024, 8:56 PM
Unknown Object (File)
Apr 8 2024, 9:07 AM
Unknown Object (File)
Apr 7 2024, 11:15 PM
Unknown Object (File)
Apr 7 2024, 9:56 PM
Subscribers

Details

Summary

This allows native to get all aux user infos from sqlite aux user store

Depends on D11509

Test Plan

Ran the following code and confirmed results by getting all aux user infos:

async function run_test() {
  console.log('running run_test()');

  await commCoreModule.processAuxUserStoreOperations([
    {
      type: 'remove_all_aux_user_infos',
    },
  ]);

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

  await commCoreModule.processAuxUserStoreOperations([
    {
      type: 'replace_aux_user_info',
      payload: {
        id: 'test_aux_user_A',
        auxUserInfo: JSON.stringify({ fid: 'test_fid_of_user_A' }),
      },
    },
    {
      type: 'remove_all_aux_user_infos',
    },
    {
      type: 'replace_aux_user_info',
      payload: {
        id: 'test_aux_user_B',
        auxUserInfo: JSON.stringify({ fid: 'test_fid_of_user_B' }),
      },
    },
    {
      type: 'replace_aux_user_info',
      payload: {
        id: 'test_aux_user_C',
        auxUserInfo: JSON.stringify({ fid: 'test_fid_of_user_C' }),
      },
    },
    {
      type: 'remove_aux_user_infos',
      payload: {
        ids: ['test_aux_user_C'],
      },
    },
  ]);

  data = await commCoreModule.getClientDBStore();
  console.log(data.auxUserInfos);
}

Screenshot 2024-04-01 at 2.04.16 AM.png (60×585 px, 8 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 requested review of this revision.Mar 31 2024, 11:20 PM
This revision is now accepted and ready to land.Apr 1 2024, 8:28 PM