Skip to content

@azure/cosmos_3.8.0

Compare
Choose a tag to compare
@azure-sdk azure-sdk released this 10 Aug 23:53
f80652c

3.8.0 (2020-08-10)

  • FEATURE: Throws when initializing ClientContext with an invalid endpoint
  • FEATURE: Changes JSONArray type internal from Array to ArrayLike to avoid requiring type coercion for immutable data
  • FEATURE: Adds bulk request to container.items. Allows aggregate bulk request for up to 100 operations on items with the types: Create, Upsert, Read, Replace, Delete
// up to 100 operations
const operations: OperationInput[] = [
  {
    operationType: "Create",
    resourceBody: { id: "doc1", name: "sample", key: "A" }
  },
  {
    operationType: "Upsert",
    resourceBody: { id: "doc2", name: "other", key: "A" }
  },
  {
    operationType: "Read",
    id: "readItemId",
    partitionKey: "key"
  }
];

await database.container.items.bulk(operations);