mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-01-04 08:41:41 +00:00
Updated to have a write client and multiple read clients. Added enum to help with selection of client based on needed operation.
Need to modify endpoint selection in CosmosClient to select endpoints based on client called.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { JSONObject, OperationResponse } from "@azure/cosmos";
|
||||
import { CollectionBase } from "../../Contracts/ViewModels";
|
||||
import { logConsoleInfo, logConsoleProgress } from "../../Utils/NotificationConsoleUtils";
|
||||
import { client } from "../CosmosClient";
|
||||
import { ClientOperationType, client } from "../CosmosClient";
|
||||
import { handleError } from "../ErrorHandlingUtils";
|
||||
|
||||
export const bulkCreateDocument = async (
|
||||
@@ -13,7 +13,7 @@ export const bulkCreateDocument = async (
|
||||
);
|
||||
|
||||
try {
|
||||
const response = await client()
|
||||
const response = await client(ClientOperationType.WRITE)
|
||||
.database(collection.databaseId)
|
||||
.container(collection.id())
|
||||
.items.bulk(
|
||||
|
||||
Reference in New Issue
Block a user