@@ -18,9 +18,8 @@ information.
18
18
19
19
.. tip::
20
20
21
- When accessing :ref:`database <mdb-shell-help-db>` and
22
- :ref:`collection <mdb-shell-help-collection>` help in ``mongosh``,
23
- you can use the ``.help()`` and ``.help`` syntaxes interchangeably.
21
+ When accessing help in ``mongosh``, you can use the ``.help()`` and
22
+ ``.help`` syntaxes interchangeably.
24
23
25
24
.. _mdb-shell-help-command-line:
26
25
@@ -242,3 +241,53 @@ Show Additional Usage Details for a Collection Method
242
241
243
242
.. didn't include the cursor details from the manual help page as
244
243
it seems as if most of it doesn't apply for ``mongosh``
244
+
245
+ BSON Class Help
246
+ ---------------
247
+
248
+ ``mongosh`` provides help methods for :term:`BSON <BSON>` classes. The
249
+ help methods provide a brief overview of the BSON class and a link with
250
+ more information.
251
+
252
+ To access help for BSON classes, run ``.help()`` on either the class
253
+ name or an instantiated instance of the class:
254
+
255
+ .. code-block:: none
256
+
257
+ <BSON class>.help()
258
+ // or
259
+ <BSON class>().help()
260
+
261
+ For example, to view help for the ``ObjectId`` BSON class, run one of
262
+ the following commands:
263
+
264
+ .. code-block:: javascript
265
+
266
+ ObjectId.help()
267
+
268
+ .. code-block:: javascript
269
+
270
+ ObjectId().help()
271
+
272
+ ``mongosh`` returns the same output for both ``.help()`` methods:
273
+
274
+ .. code-block:: javascript
275
+ :copyable: false
276
+
277
+ The ObjectId BSON Class:
278
+
279
+ For more information on usage: https://mongodb.github.io/node-mongodb-native/3.6/api/ObjectID.html
280
+
281
+ ``mongosh`` provides help methods for the following BSON classes:
282
+
283
+ - ``BinData``
284
+ - ``Code``
285
+ - ``DBRef``
286
+ - ``MinKey``
287
+ - ``MaxKey``
288
+ - ``NumberDecimal``
289
+ - ``NumberInt``
290
+ - ``NumberLong``
291
+ - ``ObjectId``
292
+ - ``Symbol`` *(Deprecated)*
293
+ - ``Timestamp``
0 commit comments