|
4 | 4 | Usage Examples
|
5 | 5 | ==============
|
6 | 6 |
|
7 |
| -.. default-domain:: mongodb |
8 |
| - |
9 | 7 | .. contents:: On this page
|
10 | 8 | :local:
|
11 | 9 | :backlinks: none
|
12 | 10 | :depth: 1
|
13 | 11 | :class: singlecol
|
14 | 12 |
|
| 13 | +.. facet:: |
| 14 | + :name: genre |
| 15 | + :values: reference |
| 16 | + |
| 17 | +.. meta:: |
| 18 | + :keywords: read, write, example, code example |
| 19 | + |
15 | 20 | .. toctree::
|
16 | 21 |
|
17 | 22 | /usage-examples/find-operations
|
@@ -78,18 +83,31 @@ You can use `GoDotEnv <https://github.com/joho/godotenv>`__ to define
|
78 | 83 | your environment variable.
|
79 | 84 |
|
80 | 85 | Add the following application configuration in your ``.env`` file at the
|
81 |
| -root of your project. To learn more, see the |
| 86 | +root of your project, replacing the placeholders with the values for your |
| 87 | +deployment's connection string. To learn more, see the |
82 | 88 | `GoDotEnv documentation <https://github.com/joho/godotenv#usage>`__.
|
83 | 89 |
|
84 | 90 | .. code-block::
|
85 | 91 |
|
86 | 92 | MONGODB_URI=mongodb+srv://<user>:<password>@<cluster-url>?retryWrites=true&w=majority
|
87 | 93 |
|
88 |
| -.. note:: |
89 |
| - |
90 |
| - Replace the preceding connection string with :ref:`your MongoDB deployment's connection string <golang-usage-examples-connection-string>`. |
91 |
| - |
92 |
| -.. _golang-usage-examples-connection-string: |
93 |
| - |
94 |
| - |
| 94 | +Examples |
| 95 | +-------- |
95 | 96 |
|
| 97 | +You can find usage examples for the following tasks: |
| 98 | + |
| 99 | +- :ref:`golang-find-one` |
| 100 | +- :ref:`golang-find-multiple` |
| 101 | +- :ref:`golang-insert-one` |
| 102 | +- :ref:`golang-insert-many` |
| 103 | +- :ref:`golang-update-one` |
| 104 | +- :ref:`golang-update-many` |
| 105 | +- :ref:`golang-replace` |
| 106 | +- :ref:`golang-delete-one` |
| 107 | +- :ref:`golang-delete-many` |
| 108 | +- :ref:`golang-bulk-ops-usage-example` |
| 109 | +- :ref:`golang-watch` |
| 110 | +- :ref:`golang-count-usage-example` |
| 111 | +- :ref:`golang-distinct-usage-example` |
| 112 | +- :ref:`golang-run-command-usage-example` |
| 113 | +- :ref:`golang-struct-tags-usage-example` |
0 commit comments