Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node and React Native Data Types #1065

Merged
merged 29 commits into from
May 19, 2021
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
849b626
New data types node rn (#1040)
May 6, 2021
d9d42cd
fixed refs for node.js data types
May 6, 2021
765c511
update doc
May 6, 2021
bbc7817
Remove accidental changes
May 6, 2021
9054308
added empty test file
May 6, 2021
c894f77
(DOCSP-15613): Added Node.js field types (#1041)
May 11, 2021
2755206
(DOCSP-15613): Node.js collections type (#1044)
May 11, 2021
b79ffbc
(DOCSP-15613): Node.js embedded objects type (#1047)
May 11, 2021
2475974
Docsp 14569 mixed data type (#1064)
May 11, 2021
efae8d0
(DOCSP-14565): Dictionary data type (#1058)
May 13, 2021
5f43200
(DOCSP-14577): UUID (#1067)
May 18, 2021
c003974
(DOCSP-14573): set data type (#1079)
May 19, 2021
2202f42
fill out field types
May 19, 2021
43e9e37
add react native data types as a copy of node data types
May 19, 2021
6b5aaef
add data types to toc
May 19, 2021
63a342e
fix rn mixed links
May 19, 2021
33d63be
attempt to add realm-js links
May 19, 2021
b2587f1
more grammar and woridng fixes
May 19, 2021
d7dbb9e
wording fixes
May 19, 2021
96870ba
Update source/sdk/node/data-types/uuid.txt
May 19, 2021
efb91b9
change uuid note on rn to match node
May 19, 2021
375093f
added note about obj id to both rn and node
May 19, 2021
f2035ae
Update source/sdk/node/data-types/mixed.txt
May 19, 2021
897704a
fix 'mixed' formatting on rn to match node
May 19, 2021
c44908b
change monospace to bold
May 19, 2021
e0ea0fc
fix spacing errors
May 19, 2021
97a5350
fix wording
May 19, 2021
99078cc
correct supported types for mixed
May 19, 2021
e0cc203
wording update
May 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more grammar and woridng fixes
Mohammad Hunan Chughtai committed May 19, 2021
commit b2587f181cc2a6195491e0579b07eb5f1e9752d3
4 changes: 2 additions & 2 deletions source/sdk/node/data-types/dictionaries.txt
Original file line number Diff line number Diff line change
@@ -50,8 +50,8 @@ dictionary's properties by using :mdn:`bracket-notation <Web/JavaScript/Referenc
You can also determine whether a results collection has a certain key or value
by using ``<dictionary>.@keys`` or ``<dictionary>.@values``. For instance, if
you had a ``Person`` collection with a nested ``home`` dictionary, you could
determine return all ``Person`` objects with a ``home`` with a ``"price"``
property by running the query: ``home.@keys = "price"``.
return all ``Person`` objects with a ``home`` with a ``"price"`` property by
running the query: ``home.@keys = "price"``.

.. literalinclude:: /examples/generated/node/data-types.codeblock.query-a-dictionary.js
:language: javascript
8 changes: 4 additions & 4 deletions source/sdk/node/data-types/field-types.txt
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@ Field Types - Node.js SDK
{+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.
- ``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.
@@ -24,6 +24,6 @@ Field Types - Node.js SDK
- ``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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ``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.
- ``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 types by appending ``[]`` to the type name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed locally 👍 , ignoring the commit suggestion. Changed it to "...contains a list of primitive value types by appending []"

- ``linkingObjects`` is a special type used to define an inverse relationship.
- ``uuid`` is a universally unique identifier from :js-sdk:`Realm.BSON <Realm.html#.BSON>`. The ``UUID`` data type is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.
- ``set`` is based on the JavaScript :mdn:`Set <Web/JavaScript/Reference/Global_Objects/Set>` type. ``{+service-short+} Set`` is is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.
- ``set`` is based on the JavaScript :mdn:`Set <Web/JavaScript/Reference/Global_Objects/Set>` type. ``{+service-short+} Set`` is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.
- ``dictionary`` used to manage a collection of unique String keys paired with values. The ``Dictionary`` data type is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.
- ``mixed`` is a property type that can hold different data types. The ``Mixed`` data type is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.
4 changes: 2 additions & 2 deletions source/sdk/react-native/data-types/dictionaries.txt
Original file line number Diff line number Diff line change
@@ -50,8 +50,8 @@ dictionary's properties by using :mdn:`bracket-notation <Web/JavaScript/Referenc
You can also determine whether a results collection has a certain key or value
by using ``<dictionary>.@keys`` or ``<dictionary>.@values``. For instance, if
you had a ``Person`` collection with a nested ``home`` dictionary, you could
determine return all ``Person`` objects with a ``home`` with a ``"price"``
property by running the query: ``home.@keys = "price"``.
return all ``Person`` objects with a ``home`` with a ``"price"`` property by
running the query: ``home.@keys = "price"``.

.. literalinclude:: /examples/generated/node/data-types.codeblock.query-a-dictionary.js
:language: javascript
8 changes: 4 additions & 4 deletions source/sdk/react-native/data-types/field-types.txt
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@ Field Types - React Native SDK
{+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.
- ``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.
@@ -24,6 +24,6 @@ Field Types - React Native SDK
- ``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.
- ``linkingObjects`` is a special type used to define an inverse relationship.
- ``uuid`` is a universally unique identifier from :js-sdk:`Realm.BSON <Realm.html#.BSON>`. The ``UUID`` data type is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.
- ``set`` is based on the JavaScript :mdn:`Set <Web/JavaScript/Reference/Global_Objects/Set>` type. ``{+service-short+} Set`` is is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.
- ``set`` is based on the JavaScript :mdn:`Set <Web/JavaScript/Reference/Global_Objects/Set>` type. ``{+service-short+} Set`` is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.
- ``dictionary`` used to manage a collection of unique String keys paired with values. The ``Dictionary`` data type is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.
- ``mixed`` is a property type that can hold different data types. The ``Mixed`` data type is available in the :js-sdk:`[email protected] release <realm/realm-js/releases/tag/v10.5.0-beta.1>`.