Page MenuHomePhabricator

[SQLite] implement C++ code to get users
ClosedPublic

Authored by kamil on Nov 16 2023, 6:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 27, 5:22 PM
Unknown Object (File)
Sat, Oct 19, 12:33 PM
Unknown Object (File)
Fri, Oct 18, 9:05 AM
Unknown Object (File)
Fri, Oct 18, 8:15 AM
Unknown Object (File)
Fri, Oct 18, 8:11 AM
Unknown Object (File)
Sep 28 2024, 9:02 PM
Unknown Object (File)
Sep 28 2024, 9:02 PM
Unknown Object (File)
Sep 28 2024, 9:02 PM
Subscribers

Details

Summary

Code for native ops

Depends on D9910

Test Plan

Code for testing:

const { users } = await commCoreModule.getClientDBStore();
console.log(users);
await commCoreModule.processUserStoreOperations([
  {
    type: 'replace_user',
    payload: {
      id: '1',
      userInfo: 'test',
    },
  },
  {
    type: 'replace_user',
    payload: {
      id: '2',
      userInfo: 'test',
    },
  },
]);

const { users: users2 } = await commCoreModule.getClientDBStore();
console.log(users2);

await commCoreModule.processUserStoreOperations([
  {
    type: 'replace_user',
    payload: {
      id: '2',
      userInfo: 'test',
    },
  },
]);

const { users: users3 } = await commCoreModule.getClientDBStore();
console.log(users3);

await commCoreModule.processUserStoreOperations([
  {
    type: 'remove_users',
    payload: {
      ids: ['1'],
    },
  },
]);

const { users: users4 } = await commCoreModule.getClientDBStore();
console.log(users4);

await commCoreModule.processUserStoreOperations([
  {
    type: 'remove_all_users',
  },
]);

const { users: users5 } = await commCoreModule.getClientDBStore();
console.log(users5);

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable