From c894f77f0f025d03dcb3f6ec77f548ee93f48a00 Mon Sep 17 00:00:00 2001 From: Mohammad Hunan Chughtai Date: Tue, 11 May 2021 10:47:54 -0400 Subject: [PATCH] (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 --- source/sdk/node/data-types/field-types.txt | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/source/sdk/node/data-types/field-types.txt b/source/sdk/node/data-types/field-types.txt index f9b36305cc..9037883fa7 100644 --- a/source/sdk/node/data-types/field-types.txt +++ b/source/sdk/node/data-types/field-types.txt @@ -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 ` type +- ``int`` maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``int`` with 64 bits. +- ``float`` maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``float`` with 32 bits. +- ``double`` maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``double`` with 64 bits. +- ``string`` maps to the JavaScript :mdn:`String ` type. +- ``decimal128`` for high precision numbers. +- ``objectId`` maps to BSON :manual:`ObjectId ` type. +- ``data`` maps to the JavaScript :mdn:`ArrayBuffer ` type. +- ``date`` maps to the JavaScript :mdn:`Date ` type. +- ``list`` maps to the JavaScript :mdn:`Array ` type. You can also specify that a field contains a list of a primitive value type by appending ``[]`` to the type name. \ No newline at end of file