Skip to content

Commit

Permalink
[Cosmos] Update Containers createIfNotExists() docs (#9355)
Browse files Browse the repository at this point in the history
The content of the comment in the method is the same as that described in `Databases.createIfNotExists()`, and it does not match the content of `Containers.createIfNotExists()`, so it was corrected.
  • Loading branch information
ymasaoka authored Jun 7, 2020
1 parent 5fac78d commit 859f16b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/cosmosdb/cosmos/src/client/Container/Containers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ export class Containers {
throw new Error("body parameter must be an object with an id property");
}
/*
1. Attempt to read the Database (based on an assumption that most databases will already exist, so its faster)
2. If it fails with NotFound error, attempt to create the db. Else, return the read results.
1. Attempt to read the Container (based on an assumption that most containers will already exist, so its faster)
2. If it fails with NotFound error, attempt to create the container. Else, return the read results.
*/
try {
const readResponse = await this.database.container(body.id).read(options);
Expand Down

0 comments on commit 859f16b

Please sign in to comment.