Skip to content

Commit 22d8c21

Browse files
committed
Added AtlasUI tabs
1 parent 3c9ee97 commit 22d8c21

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

docs/30-simple-queries/0-using-library-database.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
3+
14
# Using the library database
25

36
## Select the library database
47

58
💻 We'll use the `library` database. To do that, in a MongoDB shell type in:
69

10+
<Tabs groupId="aggregations">
11+
<TabItem value="mongosh" label="mongosh">
12+
713
```js
814
use library
915
```
@@ -14,6 +20,22 @@ You can show all collections with
1420
show collections
1521
```
1622

23+
</TabItem>
24+
<TabItem value="atlas" label="Atlas UI">
25+
26+
Select the correct DB in the Atlas UI
27+
28+
29+
<Screenshot src="/img/30-simple-queries/select-db.png" url="http://cloud.mongodb.com/yourcluster" alt="AtlasUI Showing the available DBs" />
30+
31+
</TabItem>
32+
</Tabs>
33+
34+
35+
36+
---
37+
38+
1739
🦸‍♂️ 💻 How would you switch to a database called `orders`?
1840

1941
:::info

docs/30-simple-queries/1-empty-aggregation.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
3+
14
# Empty aggregation pipeline
25

36
## An empty aggregation
47

58
This code returns a [cursor](https://www.mongodb.com/docs/manual/reference/method/js-cursor/) with all documents in the `authors` collection:
69

10+
<Tabs groupId="aggregations">
11+
<TabItem value="mongosh" label="mongosh">
12+
713
```js
814
db.authors.aggregate([])
915
```
1016

17+
</TabItem>
18+
<TabItem value="atlas" label="Atlas UI">
19+
20+
<Screenshot src="/img/30-simple-queries/atlas-aggregation.png" url="http://cloud.mongodb.com/yourcluster" alt="AtlasUI Showing the available DBs" />
21+
22+
- Open the Aggregation tab
23+
- Select Text entry
24+
- Type in the aggregation pipeline:
25+
26+
```js
27+
[]
28+
```
29+
30+
</TabItem>
31+
</Tabs>
32+
33+
34+
1135
We can iterate over this cursor and get more documents typing `it`.
1236

1337
💻 Return all the documents in the `books` collection and iterate to get the next page of books.
623 KB
Loading
745 KB
Loading

0 commit comments

Comments
 (0)