File tree Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ Tutorial
90
90
Next, add a :manual:`$sort
91
91
</reference/operator/aggregation/sort>` stage that sorts the
92
92
documents in descending order by the ``dateofbirth`` field to
93
- list the youngest people first:
93
+ list the youngest people first. Because Python dictionaries don't maintain the
94
+ order of their elements, use a ``SON``or ``OrderedDict`` object
95
+ instead:
94
96
95
97
.. literalinclude:: /includes/aggregation/filtered-subset.py
96
98
:language: python
Original file line number Diff line number Diff line change 1
- As python dictionaries don't maintain order you should use ``~bson.son.SON``
2
- or ``collections.OrderedDict`` where explicit ordering is required
3
- eg "$sort":
4
-
5
1
To run an explain plan for this aggregation use
6
2
`PyMongoExplain <https://pypi.org/project/pymongoexplain/>`_,
7
3
a companion library for PyMongo. It allows you to explain any CRUD operation
Original file line number Diff line number Diff line change @@ -12,9 +12,13 @@ Connect to MongoDB
12
12
:maxdepth: 1
13
13
14
14
/connect/tls
15
- /connect/client-certificates
15
+ /connect/network-compression
16
+ /connect/server-selection
17
+ /connect/stable-api
16
18
/connect/csot
17
19
18
20
- :ref:`pymongo-tls`
19
- - :ref:`pymongo-client-certificates`
21
+ - :ref:`pymongo-network-compression`
22
+ - :ref:`pymongo-server-selection`
23
+ - :ref:`pymongo-stable-api`
20
24
- :ref:`pymongo-csot`
Original file line number Diff line number Diff line change @@ -11,14 +11,12 @@ Fundamentals
11
11
:titlesonly:
12
12
:maxdepth: 1
13
13
14
- /fundamentals/authentication
15
14
/fundamentals/collations
16
15
/fundamentals/databases-and-collections
17
16
/fundamentals/dates-and-times
18
17
/fundamentals/gridfs
19
18
/fundamentals/type-hints
20
19
21
- - :ref:`pymongo-auth`
22
20
- :ref:`pymongo-collations`
23
21
- :ref:`pymongo-databases-collections`
24
22
- :ref:`pymongo-dates-times`
Original file line number Diff line number Diff line change @@ -10,11 +10,6 @@ Troubleshooting
10
10
.. meta::
11
11
:keywords: error, help
12
12
13
- .. note:: Troubleshooting TLS Errors
14
-
15
- For information about TLS errors you might see when using {+driver-short+}, see the
16
- :ref:`TLSErrors` section.
17
-
18
13
Server Reports Wire Version X, PyMongo Requires Y
19
14
-------------------------------------------------
20
15
432
427
433
428
.. include:: /includes/troubleshooting/tls.rst
434
429
430
+ Client-Side Operation Timeouts
431
+ ------------------------------
432
+
433
+ .. include:: /includes/troubleshooting/csot.rst
434
+
435
435
Projections
436
436
-----------
437
437
You can’t perform that action at this time.
0 commit comments