HomePhabricator
Diffusion Comm 17ac5aa279aa

[SQLite] implement C++ code to get users

Description

[SQLite] implement C++ code to get users

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);

Reviewers: tomek

Reviewed By: tomek

Subscribers: ashoat

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

Details

Provenance
kamilAuthored on Nov 14 2023, 5:43 AM
Reviewer
tomek
Differential Revision
D9911: [SQLite] implement C++ code to get users
Parents
rCOMMa5c95cab2250: [SQLite] implement C++ user store ops
Branches
Unknown
Tags
Unknown