-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(DOCSP-15613): Added Node.js field types (#1041)
* Added node.js field types * fixed wording * fixed typo * fix typo in mdn urls * added additional data types * fix monospace err Co-authored-by: Mohammad Hunan Chughtai <mohammad.hunan@mongodb.com>
- Loading branch information
Mohammad Hunan Chughtai
and
Mohammad Hunan Chughtai
authored
May 11, 2021
1 parent
9054308
commit c894f77
Showing
1 changed file
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
.. _node-data-types-field-types: | ||
|
||
========================= | ||
Field Types - Node.js SDK | ||
========================= | ||
|
||
======================== | ||
Field Types -Node.js SDK | ||
======================== | ||
.. default-domain:: mongodb | ||
|
||
.. contents:: On this page | ||
:local: | ||
:backlinks: none | ||
:depth: 2 | ||
:class: singlecol | ||
|
||
|
||
{+client-database+} supports the following field data types: | ||
|
||
- ``bool`` maps to the JavaScript :mdn:`Boolean <Web/JavaScript/Reference/Global_Objects/Boolean>` type | ||
- ``int`` maps to the JavaScript :mdn:`Number <Web/JavaScript/Reference/Global_Objects/Number>` type. Internally {+client-database+} stores ``int`` with 64 bits. | ||
- ``float`` maps to the JavaScript :mdn:`Number <Web/JavaScript/Reference/Global_Objects/Number>` type. Internally {+client-database+} stores ``float`` with 32 bits. | ||
- ``double`` maps to the JavaScript :mdn:`Number <Web/JavaScript/Reference/Global_Objects/Number>` type. Internally {+client-database+} stores ``double`` with 64 bits. | ||
- ``string`` maps to the JavaScript :mdn:`String <Web/JavaScript/Reference/Global_Objects/Boolean>` type. | ||
- ``decimal128`` for high precision numbers. | ||
- ``objectId`` maps to BSON :manual:`ObjectId </reference/method/ObjectId/>` type. | ||
- ``data`` maps to the JavaScript :mdn:`ArrayBuffer <Web/JavaScript/Reference/Global_Objects/ArrayBuffer>` type. | ||
- ``date`` maps to the JavaScript :mdn:`Date <Web/JavaScript/Reference/Global_Objects/Date>` type. | ||
- ``list`` maps to the JavaScript :mdn:`Array <Web/JavaScript/Reference/Global_Objects/Array>` type. You can also specify that a field contains a list of a primitive value type by appending ``[]`` to the type name. |