File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -120,15 +120,19 @@ The following example reads the sample BSON document from ``file.bson``:
120
120
Work with Raw BSON Data
121
121
-----------------------
122
122
123
- You might prefer to use raw BSON documents in certain cases, such as when you move a
124
- document between databases or collections, when you must write binary blobs to a
125
- disk, or when you want to bypass the performance overhead of converting to and from
126
- {+language+} dictionaries. You can use the ``RawBSONDocument`` class to represent raw BSON
127
- documents. To use ``RawBSONDocument`` objects with your collection, set the
123
+ {+driver-short+} supports the usage of raw BSON documents. The following list contains
124
+ some situations that might require using raw BSON documents:
125
+
126
+ - Moving a document between databases or collections
127
+ - Writing binary blobs to a disk
128
+ - Bypassing the performance overhead of converting to and from {+language+} dictionaries.
129
+
130
+ You can use the ``RawBSONDocument`` class to represent raw BSON documents. To use
131
+ ``RawBSONDocument`` objects to represent documents in your collection, set the
128
132
``document_class`` parameter of the ``MongoClient`` constructor to ``RawBSONDocument``.
129
133
130
- The following example fetches the sample BSON document from a collection and converts it
131
- to a ``RawBSONDocument`` :
134
+ The following example configures a ``MongoClient`` object to use ``RawBSONDocument``,
135
+ then retrieves the sample document :
132
136
133
137
.. code-block:: python
134
138
You can’t perform that action at this time.
0 commit comments