[sqlite] implement processing synced metadata store ops on worker
Summary:
This code allows the shared worker on web to use synced metadata sqlite ops
Depends on D11419
Test Plan:
Ran the following code:
const sharedWorker = await getCommSharedWorker(); const op_response = await sharedWorker.schedule({ type: workerRequestMessageTypes.PROCESS_STORE_OPERATIONS, storeOperations: { syncedMetadataStoreOperations: [ { type: 'replace_synced_metadata_entry', payload: { name: 'worker_test_A_name', data: 'worker_test_A_data', }, }, { type: 'replace_synced_metadata_entry', payload: { name: 'worker_test_B_name', data: 'worker_test_B_update', }, }, { type: 'replace_synced_metadata_entry', payload: { name: 'worker_test_A_name', data: 'worker_test_A_update', }, }, { type: 'remove_synced_metadata', payload: { names: ['worker_test_B_name'], }, }, ], }, }); if (!op_response) { return; }
and confirmed result by downloading the web database:
Reviewers: kamil, ginsu, atul
Reviewed By: kamil
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D11420