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)
Tue, Dec 31, 6:31 AM
Unknown Object (File)
Tue, Dec 31, 6:31 AM
Unknown Object (File)
Tue, Dec 31, 6:31 AM
Unknown Object (File)
Tue, Dec 31, 6:30 AM
Unknown Object (File)
Tue, Dec 31, 6:22 AM
Unknown Object (File)
Nov 25 2024, 9:58 PM
Unknown Object (File)
Nov 8 2024, 12:48 AM
Unknown Object (File)
Oct 27 2024, 5:22 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