From 3dbe0df2455135a1cfee736dd664d89efda3e835 Mon Sep 17 00:00:00 2001 From: Mohammad Hunan Chughtai Date: Wed, 5 May 2021 22:59:31 -0400 Subject: [PATCH 1/6] Added node.js field types --- source/sdk/node/data-types/field-types.txt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/source/sdk/node/data-types/field-types.txt b/source/sdk/node/data-types/field-types.txt index e3685b3eb4..d85142eb9e 100644 --- a/source/sdk/node/data-types/field-types.txt +++ b/source/sdk/node/data-types/field-types.txt @@ -1,16 +1,21 @@ .. _node-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`` which maps to the JavaScript :mdn:`Boolean ` type +- ``int`` which maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``int`` with 64 bits. +- ``float`` which maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``int`` with 32 bits. +- ``double`` which maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``int`` with 64 bits. +- ``string`` which maps to the JavaScript :mdn:`String ` type. +- ``data`` which maps to the JavaScript :mdn:`ArrayBuffer ` type. +- ``date`` which maps to the JavaScript :mdn:`Date ` type. \ No newline at end of file From 52abbd4b9b8f0cebe4334d89106eddb9d1fe5a31 Mon Sep 17 00:00:00 2001 From: Mohammad Hunan Chughtai Date: Wed, 5 May 2021 23:02:00 -0400 Subject: [PATCH 2/6] fixed wording --- source/sdk/node/data-types/field-types.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/sdk/node/data-types/field-types.txt b/source/sdk/node/data-types/field-types.txt index d85142eb9e..87bffa5131 100644 --- a/source/sdk/node/data-types/field-types.txt +++ b/source/sdk/node/data-types/field-types.txt @@ -9,13 +9,13 @@ Field Types -Node.js SDK :backlinks: none :depth: 2 :class: singlecol - + {+client-database+} supports the following field data types: -- ``bool`` which maps to the JavaScript :mdn:`Boolean ` type -- ``int`` which maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``int`` with 64 bits. -- ``float`` which maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``int`` with 32 bits. -- ``double`` which maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``int`` with 64 bits. -- ``string`` which maps to the JavaScript :mdn:`String ` type. -- ``data`` which maps to the JavaScript :mdn:`ArrayBuffer ` type. -- ``date`` which maps to the JavaScript :mdn:`Date ` type. \ No newline at end of file +- ``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 ``int`` with 32 bits. +- ``double`` maps to the JavaScript :mdn:`Number ` type. Internally {+client-database+} stores ``int`` with 64 bits. +- ``string`` maps to the JavaScript :mdn:`String ` type. +- ``data`` maps to the JavaScript :mdn:`ArrayBuffer ` type. +- ``date`` maps to the JavaScript :mdn:`Date ` type. \ No newline at end of file From 420962f8ab2071921e1e49df8ad49f23f7665d01 Mon Sep 17 00:00:00 2001 From: Mohammad Hunan Chughtai Date: Wed, 5 May 2021 23:02:42 -0400 Subject: [PATCH 3/6] fixed typo --- source/sdk/node/data-types/field-types.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/sdk/node/data-types/field-types.txt b/source/sdk/node/data-types/field-types.txt index 87bffa5131..bd79e450d1 100644 --- a/source/sdk/node/data-types/field-types.txt +++ b/source/sdk/node/data-types/field-types.txt @@ -14,8 +14,8 @@ Field Types -Node.js SDK - ``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 ``int`` with 32 bits. -- ``double`` 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. - ``data`` maps to the JavaScript :mdn:`ArrayBuffer ` type. - ``date`` maps to the JavaScript :mdn:`Date ` type. \ No newline at end of file From 47d1bd8b406f27f23adcad00321ceb05da509b3e Mon Sep 17 00:00:00 2001 From: Mohammad Hunan Chughtai Date: Wed, 5 May 2021 23:04:01 -0400 Subject: [PATCH 4/6] fix typo in mdn urls --- source/sdk/node/data-types/field-types.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/sdk/node/data-types/field-types.txt b/source/sdk/node/data-types/field-types.txt index bd79e450d1..1b307a8acc 100644 --- a/source/sdk/node/data-types/field-types.txt +++ b/source/sdk/node/data-types/field-types.txt @@ -12,10 +12,10 @@ Field Types -Node.js SDK {+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. -- ``data`` maps to the JavaScript :mdn:`ArrayBuffer ` type. -- ``date`` maps to the JavaScript :mdn:`Date ` type. \ No newline at end of file +- ``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. +- ``data`` maps to the JavaScript :mdn:`ArrayBuffer ` type. +- ``date`` maps to the JavaScript :mdn:`Date ` type. \ No newline at end of file From 0168cda4a4266cca0d3a98dd81e0ee620440ee37 Mon Sep 17 00:00:00 2001 From: Mohammad Hunan Chughtai Date: Mon, 10 May 2021 08:29:01 -0400 Subject: [PATCH 5/6] added additional data types --- source/sdk/node/data-types/field-types.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/sdk/node/data-types/field-types.txt b/source/sdk/node/data-types/field-types.txt index 7ff9cefe4e..17418275ee 100644 --- a/source/sdk/node/data-types/field-types.txt +++ b/source/sdk/node/data-types/field-types.txt @@ -17,5 +17,8 @@ Field Types -Node.js SDK - ``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. \ No newline at end of file +- ``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. From 33344ff94aac383798edee01dfcd958d8a228c43 Mon Sep 17 00:00:00 2001 From: Mohammad Hunan Chughtai Date: Tue, 11 May 2021 10:43:29 -0400 Subject: [PATCH 6/6] fix monospace err --- source/sdk/node/data-types/field-types.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/sdk/node/data-types/field-types.txt b/source/sdk/node/data-types/field-types.txt index 17418275ee..9037883fa7 100644 --- a/source/sdk/node/data-types/field-types.txt +++ b/source/sdk/node/data-types/field-types.txt @@ -21,4 +21,4 @@ Field Types -Node.js SDK - ``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. +- ``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