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
F3394585: D11510.id38834.diff
Sat, Nov 30, 8:40 PM
Unknown Object (File)
Sun, Nov 3, 1:50 AM
Unknown Object (File)
Oct 23 2024, 5:49 AM
Unknown Object (File)
Oct 22 2024, 5:14 AM
Unknown Object (File)
Oct 14 2024, 3:35 PM
Unknown Object (File)
Oct 14 2024, 3:35 PM
Unknown Object (File)
Oct 14 2024, 3:35 PM
Unknown Object (File)
Oct 14 2024, 3:35 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
No Lint Coverage
Unit
No Test Coverage

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