src/vs/platform/storage/electron-main/storageIpc.ts/StorageDatabaseChannel/call
class StorageDatabaseChannel:	async call(_: unknown, command: string, arg: IBaseSerializableStorageRequest): Promise<any> {
		const workspace = reviveIdentifier(arg.workspace);

		// Get storage to be ready
		const storage = await this.withStorageInitialized(workspace);

		// handle call
		switch (command) {
			case 'getItems': {
				return Array.from(storage.items.entries());
			}

			case 'updateItems': {
				const items: ISerializableUpdateRequest = arg;

				if (items.insert) {
					for (const [key, value] of items.insert) {
						storage.set(key, value);
					}
				}

				if (items.delete) {
					items.delete.forEach(key => storage.delete(key));
				}

				break;
			}

			case 'close': {

				// We only allow to close workspace scoped storage because
				// global storage is shared across all windows and closes
				// only on shutdown.
				if (workspace) {
					return storage.close();
				}

				break;
			}

			default:
				throw new Error(`Call not found: ${command}`);
		}
	}