Skip to content

Commit 8d097a5

Browse files
authored
Merge pull request #52 from Meg528/patch-37
Update 6-writing-long-pipelines.mdx
2 parents 82f86f0 + 0df802c commit 8d097a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/30-simple-queries/6-writing-long-pipelines.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem';
77
Extra activity! Do it if you have extra time or are following along at home. It won't be covered during the hands-on lab.
88
:::
99

10-
Aggregation pipelines can get very long, depending on how many stages we need to run. Writing a pipeline is writing code, as you will write it using one of the many MongoDB drivers in your own language. Here we're presenting the examples using JavaScript suitable for the MongoDB shell [mongosh](https://www.mongodb.com/docs/mongodb-shell/), but if you are writing a microservice in Rust, you'll definitely write your pipelines in Rust.
10+
Aggregation pipelines can get very long, depending on how many stages we need to run. Writing a pipeline is writing code, as you will write it using one of the many MongoDB drivers in your own language. Here, we're presenting the examples using JavaScript suitable for the MongoDB shell [mongosh](https://www.mongodb.com/docs/mongodb-shell/), but if you are writing a microservice in Rust, you'll definitely write your pipelines in Rust.
1111

1212
:::danger
1313
The following syntax doesn't work in the Atlas UI aggregations editor. The editor doesn't support declaring variables. You can try this using the built-in MongoDB Shell in [MongoDB Compass](https://www.mongodb.com/products/tools/compass).
@@ -28,7 +28,7 @@ db.books.aggregate([
2828
{ $limit: 15 }
2929
])
3030
```
31-
Will be changed into:
31+
This will be changed into:
3232

3333

3434
```js
@@ -58,12 +58,12 @@ Write your aggregation pipelines like you'll compose functions in your programmi
5858

5959
:::tip
6060

61-
As this is code, we can even add comments (starting with `//`) to our pipelines. Or write functions that take parameters and return a stage. Or unit test our stages.
61+
As this is code, we can even add comments (starting with `//`) to our pipelines, or write functions that take parameters and return a stage, or unit test our stages.
6262

6363
:::
6464

6565

66-
👐 We can also use `$gte` to get the books with 150 pages or more. Check $gte syntax in the [docucumentation](https://www.mongodb.com/docs/manual/reference/operator/query/gte/) and write an aggregation pipeline to return 15 books from 1985 with more than 150 pages. Show only the `title`, `year`, `totalInventory`, and `available` books (sample doc [here](/docs/simple-queries/project)).
66+
👐 We can also use `$gte` to get the books with 150 pages or more. Check $gte syntax in the [documentation](https://www.mongodb.com/docs/manual/reference/operator/query/gte/) and write an aggregation pipeline to return 15 books from 1985 with more than 150 pages. Show only the `title`, `year`, `totalInventory`, and `available` books (sample doc [here](/docs/simple-queries/project)).
6767

6868
<details>
6969
<summary>Answer</summary>

0 commit comments

Comments
 (0)