Skip to content

Commit cb321be

Browse files
DOCSP-45255-mongosh-compatibility-changes-clarification (#365)
* DOCSP-45255-mongosh-compatibility-changes-clarification * remove mongosh and legacy mongo shell links for consistency * clarification
1 parent 98c3141 commit cb321be

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

source/reference/compatibility.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,27 +205,31 @@ in ``mongosh`` better align with the types used by the MongoDB Drivers.
205205
Undefined Values
206206
----------------
207207

208-
The undefined BSON type is `deprecated <https://bsonspec.org/spec.html>`__ in
209-
:binary:`bin.mongosh`. If you insert a document with the undefined JS type in
210-
:binary:`bin.mongosh`, your deployment replaces the undefined value in your
208+
The undefined BSON type is `deprecated <https://bsonspec.org/spec.html>`__.
209+
If you try to insert a document with the undefined JS type in
210+
``mongosh``, your deployment replaces the undefined value in your
211211
document with the BSON null value. There is no supported way of inserting undefined
212-
values into your database using :binary:`bin.mongosh`.
212+
values into your database using ``mongosh``.
213213

214214
For example, consider running the following code to insert a document in
215-
:binary:`bin.mongosh`:
215+
``mongosh``:
216216

217217
.. code-block:: javascript
218218

219219
db.people.insertOne( { name : "Sally", age : undefined } )
220220

221-
When you run this code in :binary:`bin.mongosh`, the shell inserts
221+
When you run this code in ``mongosh``, the shell inserts
222222
the following document:
223223

224224
.. code-block:: javascript
225225
"copyable: false
226226

227227
{ name : "Sally", age : null }
228228

229+
``mongosh`` represents any BSON undefined values stored using other tools, such as
230+
the `Go Driver <https://www.mongodb.com/docs/drivers/go/current/>`__ or the
231+
legacy ``mongo`` shell, as null.
232+
229233
Object Quoting Behavior
230234
-----------------------
231235

0 commit comments

Comments
 (0)