Skip to content

Commit 4836221

Browse files
biniona-mongodbterakilobyte
authored andcommitted
(DOCSP-20749) CRUD-Read Update (#170)
1 parent 79d811e commit 4836221

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+102
-9
lines changed

source/crud/read.txt

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
:template: guide
2+
3+
====================
4+
Read Data in MongoDB
5+
====================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 2
13+
:class: singlecol
14+
15+
Overview
16+
--------
17+
18+
Learn how to retrieve data From MongoDB.
19+
20+
.. time:: 15
21+
22+
What You'll Need
23+
----------------
24+
25+
.. include:: /includes/prereqs_read_CRUD.rst
26+
27+
Check Your Environment
28+
----------------------
29+
30+
.. include:: /includes/check_for_drivers_install.rst
31+
32+
Procedure
33+
---------
34+
35+
.. tabs-selector:: drivers
36+
37+
.. procedure::
38+
:style: normal
39+
40+
.. step:: Connect to your MongoDB instance.
41+
42+
.. include:: /includes/drivers_connect.rst
43+
44+
.. step:: Switch to the ``test`` database.
45+
46+
Switch to the database you wish to query. In this case we will be
47+
using ``test``.
48+
49+
.. include:: /includes/bind_db.rst
50+
51+
.. step:: Retrieve all documents in the ``inventory`` collection.
52+
53+
.. include:: /includes/find_all.rst
54+
55+
.. step:: Iterate over the results.
56+
57+
.. include:: /includes/iterate_all_noshellcursor.rst
58+
59+
.. step:: Check your results.
60+
61+
If you loaded the data from :doc:`/server/insert`, you should
62+
see output that resembles the following:
63+
64+
.. include:: /includes/results_read1.rst
65+
.. include:: /includes/drivers_close_connection.rst
66+
67+
Summary
68+
-------
69+
70+
If you successfully completed the procedure in this guide, you have
71+
created a MongoDB account. Using your MongoDB account,
72+
you can now access MongoDB Atlas, MongoDB Cloud Manager, MongoDB
73+
University, and MongoDB support portal.
74+
75+
What's Next
76+
-----------
77+
78+
In the next guide, you'll learn how to retrieve data from MongoDB using criteria.
79+
80+
- :doc:`Read Data from MongoDB with Queries </server/read_queries>`
81+
82+
See Also
83+
--------
84+
85+
For other CRUD guides:
86+
87+
- :doc:`/server/insert`
88+
- :doc:`/server/read_queries`
89+
- :doc:`/server/read_operators`
90+
- :doc:`/server/update`
91+
- :doc:`/server/delete`
92+
93+
.. guide-next::

source/includes/drivers_connect.rst

Lines changed: 7 additions & 7 deletions

0 commit comments

Comments
 (0)