Skip to content

Commit 7d314d0

Browse files
Merge pull request #33 from jeff-allen-mongo/DOCSP-11439
(DOCSP-11439): BSON class help
2 parents e13fe4a + 8f4b558 commit 7d314d0

File tree

1 file changed

+52
-3
lines changed

1 file changed

+52
-3
lines changed

source/reference/access-mdb-shell-help.txt

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ information.
1818

1919
.. tip::
2020

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.
2423

2524
.. _mdb-shell-help-command-line:
2625

@@ -242,3 +241,53 @@ Show Additional Usage Details for a Collection Method
242241

243242
.. didn't include the cursor details from the manual help page as
244243
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

Comments
 (0)