Skip to content

Commit 68f8d77

Browse files
committed
Fix broken links and add tip to other SDKs
1 parent 2a33be5 commit 68f8d77

File tree

10 files changed

+184
-161
lines changed

10 files changed

+184
-161
lines changed

source/sdk/dotnet/model-data/data-types/realm-value.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ other valid Realm data type except an embedded object or a set. You can create c
2727
``RealmValue`` property to contain a null value, you can
2828
use the special ``RealmValue.Null`` property.
2929

30+
Create a RealmValue Property
31+
----------------------------
32+
3033
The following code demonstrates creating a ``RealmValue`` property in a class
3134
that inherits from ``IRealmObject`` and then setting and getting the value of
3235
that property:

source/sdk/dotnet/model-data/define-object-model.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ define the appropriate properties in your schema as
287287
:ref:`dictionary <dotnet-client-dictionaries>` collection of ``RealmValue`` elements.
288288
Note that ``RealmValue`` *cannot* represent a set or an embedded object.
289289

290+
.. tip::
291+
292+
- Use a map of mixed data types when the type is unknown but each value will have a unique identifier.
293+
- Use a list of mixed data types when the type is unknown but the order of objects is meaningful.
290294

291295
.. _dotnet-omit-classes-from-schema:
292296
.. _dotnet-provide-subset-classes-schema:

source/sdk/kotlin/realm-database/schemas/define-realm-object-model.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Model Unstructured Data
4747
.. versionadded:: 2.0.0
4848

4949
Starting in Kotlin SDK version 2.0.0, you can
50-
:ref:`create nested collections of mixed data <kotlin-realmany>`
50+
:ref:`create nested collections of mixed data <kotlin-nested-collections-realmany>`
5151
within a ``RealmAny`` property.
5252

5353
The ability to nest collections of mixed data enables you to define data

source/sdk/node/model-data.txt

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ to native JavaScript objects, which means there's no need to use a special data
3636
access library, such as an :wikipedia:`ORM <Object-relational_mapping>`.
3737
Instead, you can work with Realm objects as you would any other object.
3838

39-
The following class contains a schema that defines a ``Car`` object type with
39+
The following class contains a schema that defines a ``Car`` object type with
4040
``id``, ``make``, ``model``, and ``miles`` properties. It also defines a primary key.
4141

4242
.. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-object-properties.js
@@ -61,6 +61,40 @@ schema like the following:
6161
.. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-one-to-many.js
6262
:language: javascript
6363

64+
.. _node-model-unstructured-data:
65+
66+
Model Unstructured Data
67+
-----------------------
68+
69+
.. versionadded:: 12.9.0
70+
71+
Starting in Node.js SDK version 12.9.0, you can
72+
:ref:`define nested collections
73+
of mixed data <node-nested-collections-mixed>`
74+
within a ``mixed`` property.
75+
76+
The ability to nest collections of mixed data enables you to define data
77+
that doesn't otherwise conform to an expected schema, including data with
78+
variable structure or data whose shape or type is not known at runtime.
79+
For example, you might have highly variable user-created objects, event logs,
80+
or survey response data that are collected and stored in a variety of JSON
81+
formats. This approach allows you to :ref:`react to changes <node-collection-listener>`
82+
in the nested data and to update specific elements, but it is less
83+
performant than using a structured schema or serializing JSON blobs
84+
into a single string property.
85+
86+
To model unstructured data in your schema using collections of mixed type,
87+
define the appropriate properties in your schema as
88+
:ref:`mixed <node-data-types-mixed>` types. You can then set these
89+
``mixed`` properties as a :ref:`list <node-realm-list>` or a
90+
:ref:`dictionary <node-data-types-dictionaries>` collection of mixed elements.
91+
Note that ``mixed`` *cannot* represent a set or an embedded object.
92+
93+
.. tip::
94+
95+
- Use a map of mixed data types when the type is unknown but each value will have a unique identifier.
96+
- Use a list of mixed data types when the type is unknown but the order of objects is meaningful.
97+
6498
.. _node-relationships:
6599
.. _node-client-relationships:
66100

@@ -75,7 +109,7 @@ in the :ref:`property schema <node-realm-schema>`.
75109

76110
Relationships are direct references to other objects in a realm.
77111
You don't need bridge tables or create joins to define a relationship like you
78-
would in a relational database.
112+
would in a relational database.
79113
Instead you can access related objects by reading and writing to the property
80114
that defines the relationship.
81115

@@ -89,22 +123,22 @@ There are three primary types of relationships between objects:
89123
- :ref:`Inverse Relationship <node-inverse-relationship>`
90124

91125
.. note:: Realm vs Other Databases
92-
126+
93127
Objects often contain direct references to other objects.
94128
When working with objects and references,
95129
you often copy from database storage into application memory.
96130
This situation leaves the developer with a choice of what to copy into memory:
97-
131+
98132
- You can copy the entire referenced object ahead of time.
99133
This means that all referenced data is always available quickly,
100134
but can use up a lot of resources. Depending on the amount of available memory
101135
this may not be viable.
102-
136+
103137
- You can copy only a foreign key value for each object ahead of time that you
104138
can use to query the full object if it's needed.
105139
These referenced lookups are memory-efficient.
106140
However, they require more query code and too many lookups can slow your application down.
107-
141+
108142
Realm's query architecture avoids the tradeoff between memory usage and computational overhead.
109143
Instead, Realm queries can directly reference :ref:`related objects
110144
<node-relationships>` and their properties on disk.

source/sdk/node/model-data/define-a-realm-object-model.txt

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -415,32 +415,3 @@ types in addition to embedded objects.
415415
will get the following error: "Error: You cannot query an asymmetric class.".
416416

417417
To learn more about Data Ingest, read :ref:`Optimize Sync with Data Ingest <optimize-data-ingest>`.
418-
419-
.. _node-model-unstructured-data:
420-
421-
Model Unstructured Data
422-
-----------------------
423-
424-
.. versionadded:: 12.9.0
425-
426-
Starting in Node.js SDK version 12.9.0, you can
427-
:ref:`define nested collections
428-
of mixed data <node-nested-collections-mixed>`
429-
within a ``mixed`` property.
430-
431-
The ability to nest collections of mixed data enables you to define data
432-
that doesn't otherwise conform to an expected schema, including data with
433-
variable structure or data whose shape or type is not known at runtime.
434-
For example, you might have highly variable user-created objects, event logs,
435-
or survey response data that are collected and stored in a variety of JSON
436-
formats. This approach allows you to :ref:`react to changes <node-collection-listener>`
437-
in the nested data and to update specific elements, but it is less
438-
performant than using a structured schema or serializing JSON blobs
439-
into a single string property.
440-
441-
To model unstructured data in your schema using collections of mixed type,
442-
define the appropriate properties in your schema as
443-
:ref:`mixed <node-realm-value>` types. You can then set these
444-
``mixed`` properties as a :ref:`list <node-realm-list>` or a
445-
:ref:`dictionary <node-data-types-dictionaries>` collection of mixed elements.
446-
Note that ``mixed`` *cannot* represent a set or an embedded object.

source/sdk/react-native/model-data.txt

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,41 @@ schemas to ``RealmProvider`` or ``createRealmContext()``.
5959
:language: javascript
6060
:emphasize-lines: 8
6161

62+
.. _react-native-model-unstructured-data:
63+
64+
Model Unstructured Data
65+
-----------------------
66+
67+
.. versionadded:: ``[email protected]``
68+
69+
Starting in SDK version 12.9.0, you can
70+
:ref:`define nested collections
71+
of mixed data <react-native-nested-collections-mixed>`
72+
within a ``mixed`` property.
73+
74+
The ability to nest collections of mixed data enables you to define data
75+
that doesn't otherwise conform to an expected schema, including data with
76+
variable structure or data whose shape or type is not known at runtime.
77+
For example, you might have highly variable user-created objects, event logs,
78+
or survey response data that are collected and stored in a variety of JSON
79+
formats. This approach allows you to :ref:`react to changes <react-native-collection-listener>`
80+
in the nested data and to update specific elements, but it is less
81+
performant than using a structured schema or serializing JSON blobs
82+
into a single string property.
83+
84+
To model unstructured data in your schema using collections of mixed type,
85+
define the appropriate properties in your schema as
86+
:ref:`mixed <react-nativedata-types-mixed>` types. You can then set these
87+
``mixed`` properties as a :ref:`list <react-native-realm-list>` or a
88+
:ref:`dictionary <react-native-data-types-dictionaries>` collection of mixed elements.
89+
Note that ``mixed`` *cannot* represent a set or an embedded object.
90+
91+
.. tip::
92+
93+
- Use a map of mixed data types when the type is unknown but each value will have a unique identifier.
94+
- Use a list of mixed data types when the type is unknown but the order of objects is meaningful.
95+
96+
6297
.. _react-native-client-relationships:
6398

6499
Relationships
@@ -83,18 +118,18 @@ There are three primary types of relationships between objects:
83118
- :ref:`Inverse Relationship <react-native-inverse-relationship>`
84119

85120
.. note:: Realm vs Other Databases
86-
121+
87122
Objects often contain direct references to other objects.
88123
When working with objects and references,
89124
you typically copy data from database storage into application memory.
90125
This situation leaves the developer with a choice of what to copy
91126
into memory:
92-
127+
93128
- You can copy all referenced objects into memory ahead of time.
94129
This means that all referenced data is always available quickly
95130
but can use up a lot of resources. If a system has limited memory,
96131
this may not be viable.
97-
132+
98133
- You can copy just a foreign key value for each object. Later, you
99134
can use the key to look up the full object when you need it.
100135
These "lazy" lookups are more memory-efficient than copying all

source/sdk/react-native/model-data/data-types/mixed.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ The ``CreateCatsInput`` component does the following:
6464

6565
- Get access to the opened realm instance by calling the ``useRealm()`` hook.
6666
- Use React's `useEffect <https://react.dev/reference/react/useEffect>`__ hook
67-
to call an anonymous function only once with ``useEffect`` and an
68-
empty dependency array.
67+
to call an anonymous function only once with ``useEffect`` and an
68+
empty dependency array.
6969
- Within the anonymous function, we create four different ``Cat`` objects by
70-
using the ``new`` operator to create a new realm object within a write
71-
transaction. Each of the ``Cat`` objects uses a different data type for the
72-
``birthDate`` property.
70+
using the ``new`` operator to create a new realm object within a write
71+
transaction. Each of the ``Cat`` objects uses a different data type for the
72+
``birthDate`` property.
7373
- Use the ``useQuery()`` hook to retrieve all ``Cat`` objects.
7474
- `Map <https://react.dev/learn/rendering-lists>`__ through the cats to render
75-
a list of ``Text`` components displaying each cat's ``name`` and ``birthDate``.
75+
a list of ``Text`` components displaying each cat's ``name`` and ``birthDate``.
7676

7777

7878
.. tabs-realm-languages::

source/sdk/react-native/model-data/define-a-realm-object-model.txt

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -296,35 +296,6 @@ types in addition to embedded objects.
296296

297297
To learn more about Data Ingest, read :ref:`Stream Data to Atlas <react-native-stream-data-to-atlas>`.
298298

299-
.. _react-native-model-unstructured-data:
300-
301-
Model Unstructured Data
302-
-----------------------
303-
304-
.. versionadded:: ``[email protected]``
305-
306-
Starting in SDK version 12.9.0, you can
307-
:ref:`define nested collections
308-
of mixed data <react-native-nested-collections-mixed>`
309-
within a ``mixed`` property.
310-
311-
The ability to nest collections of mixed data enables you to define data
312-
that doesn't otherwise conform to an expected schema, including data with
313-
variable structure or data whose shape or type is not known at runtime.
314-
For example, you might have highly variable user-created objects, event logs,
315-
or survey response data that are collected and stored in a variety of JSON
316-
formats. This approach allows you to :ref:`react to changes <react-native-collection-listener>`
317-
in the nested data and to update specific elements, but it is less
318-
performant than using a structured schema or serializing JSON blobs
319-
into a single string property.
320-
321-
To model unstructured data in your schema using collections of mixed type,
322-
define the appropriate properties in your schema as
323-
:ref:`mixed <react-native-realm-value>` types. You can then set these
324-
``mixed`` properties as a :ref:`list <react-native-realm-list>` or a
325-
:ref:`dictionary <react-native-data-types-dictionaries>` collection of mixed elements.
326-
Note that ``mixed`` *cannot* represent a set or an embedded object.
327-
328299
TypeScript and Required Properties
329300
----------------------------------
330301

0 commit comments

Comments
 (0)