Skip to content

Commit 25393b2

Browse files
committed
edits
1 parent 3853961 commit 25393b2

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

articles/cosmos-db/nosql/how-to-javascript-create-container.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const containerName = 'myContainer';
6767
const { container, statusCode } = await client.database(databaseName).container(containerName);
6868

6969
// Direct - assumes database and container already exist
70-
const { database, statusCode } = await database(databaseName);
70+
const { database, statusCode } = await client.database(databaseName);
7171
if(statusCode < 400){
7272
const { container, statusCode } = await database.container(containerName);
7373
}
@@ -86,9 +86,11 @@ const { resources } = await client.database(databaseName).containers
8686
.fetchAll();
8787
```
8888

89-
> [!TIP]
90-
> [Containers](/javascript/api/@azure/cosmos/containers) (plural): create or query containers
91-
> [Container](/javascript/api/@azure/cosmos/container) (singular): delete container, work with items
89+
Access by object:
90+
* [Containers](/javascript/api/@azure/cosmos/containers) (plural): Create or query containers.
91+
* [Container](/javascript/api/@azure/cosmos/container) (singular): Delete container, work with items.
92+
93+
9294

9395
## Delete a container
9496

articles/cosmos-db/nosql/how-to-javascript-create-database.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ const { resources } = await client.databases
7979
.fetchAll();
8080
```
8181

82-
> [!TIP]
83-
> [Databases](/javascript/api/@azure/cosmos/databases) (plural): Used for creating new databases, or querying/reading all databases.
84-
> [Database](/javascript/api/@azure/cosmos/database) (singular): Used for reading, updating, or deleting a existing database by id or accessing containers belonging to that database.
82+
Access by object:
83+
* [Databases](/javascript/api/@azure/cosmos/databases) (plural): Used for creating new databases, or querying/reading all databases.
84+
* [Database](/javascript/api/@azure/cosmos/database) (singular): Used for reading, updating, or deleting a existing database by id or accessing containers belonging to that database.
8585

8686
## Delete a database
8787

articles/cosmos-db/nosql/how-to-javascript-create-item.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ Access an item through the [Item](/javascript/api/@azure/cosmos/item) object. Th
7979
const { statusCode, item, resource, activityId, etag} = await client.database(databaseId).container(containerId).item(itemId).read();
8080
```
8181

82-
> [!TIP]
83-
> [Items](/javascript/api/@azure/cosmos/items) (plural): Create, batch, watch change feed, read all, upsert, or query items.
84-
> [Item](/javascript/api/@azure/cosmos/item) (singular): Read, patch, replace, or delete an item.
82+
Access by object:
83+
* [Items](/javascript/api/@azure/cosmos/items) (plural): Create, batch, watch change feed, read all, upsert, or query items.
84+
* [Item](/javascript/api/@azure/cosmos/item) (singular): Read, patch, replace, or delete an item.
8585

8686
## Replace an item
8787

0 commit comments

Comments
 (0)