You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/30-simple-queries/6-writing-long-pipelines.mdx
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem';
7
7
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.
8
8
:::
9
9
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.
11
11
12
12
:::danger
13
13
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([
28
28
{ $limit:15 }
29
29
])
30
30
```
31
-
Will be changed into:
31
+
This will be changed into:
32
32
33
33
34
34
```js
@@ -58,12 +58,12 @@ Write your aggregation pipelines like you'll compose functions in your programmi
58
58
59
59
:::tip
60
60
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.
62
62
63
63
:::
64
64
65
65
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)).
0 commit comments