-
Notifications
You must be signed in to change notification settings - Fork 88
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
(DOCSP-14565): Dictionary data type #1058
(DOCSP-14565): Dictionary data type #1058
Conversation
@@ -0,0 +1,4 @@ | |||
realm.write(() => { | |||
// remove the 'color' and 'doors' field of the Summerhill House. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be 'windows'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 👍
------------------- | ||
|
||
To define a dictionary in your object model, set the data type of your field to an empty object, ``"{}"``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{}
implies that the values are mixed. But int{}
implies a dictionary of (string, int) pairs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, I've altered the text to be more accurate now:
"To define a dictionary of mixed values in your schema, set the data type of your field to an empty object, "{}". Alternatively, to create a dictionary with values of a specific type, add the data type before the brackets. For instance, "int{}" to specify that dictionary values must be integers or "string{}" to specify that dictionary values must be strings."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* New data types node rn (#1040) * new data types for node * added data types to TOC Co-authored-by: Mohammad Hunan Chughtai <mohammad.hunan@mongodb.com> * fixed refs for node.js data types * update doc * Remove accidental changes * added empty test file * (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> * (DOCSP-15613): Node.js collections type (#1044) * Add content to Node.js > Data Types > Collections.txt * Removed unneeded spacing * clean up collections page + add headers * Filled out collections page * fix refs * fix typo * Update source/sdk/node/data-types/collections.txt * Update source/sdk/node/data-types/collections.txt * Update source/sdk/node/data-types/collections.txt Co-authored-by: Dachary <dc@dacharycarey.com> * fix rst * fix woridng * added ref * removed unneeded word * removed unneeded word * added period Co-authored-by: Mohammad Hunan Chughtai <mohammad.hunan@mongodb.com> Co-authored-by: Dachary <dc@dacharycarey.com> * (DOCSP-15613): Node.js embedded objects type (#1047) * Added documentation of Node.js embedded objects under data types * clean up relationships and embedded objects * added CRUD examples for embedded obj * added bluehawked examples * fix rst syntax highlight + add description for deletes * Update source/sdk/node/data-types/embedded-objects.txt * Update source/sdk/node/data-types/embedded-objects.txt * Update source/sdk/node/data-types/embedded-objects.txt * Update source/sdk/node/data-types/embedded-objects.txt * Update source/sdk/node/data-types/embedded-objects.txt Co-authored-by: Mohammad Hunan Chughtai <mohammad.hunan@mongodb.com> * Docsp 14569 mixed data type (#1064) * attempt to add bluehawked mixed example snippets * fixed wording * Update source/examples/generated/node/data-types.codeblock.query-objects-with-mixed-values.js * Update examples/node/Examples/data-types.js Co-authored-by: Mohammad Hunan Chughtai <mohammad.hunan@mongodb.com> * (DOCSP-14565): Dictionary data type (#1058) * (DOCSP-14565): Dictionary Data Type - Node.js * added unit tested + bluehawked dictionary examples * Update examples/node/package.json * removed unneeded file * Added new examples for dictionaries * update dictionary examples * fix capitalization * moved addlistener down * fix comment * update wording to be clearer on type usage in dict * fix wording * fix wording Co-authored-by: Mohammad Hunan Chughtai <mohammad.hunan@mongodb.com> * (DOCSP-14577): UUID (#1067) * bump realmjs to 10.5.0-beta-1 * removed uuid as it's own page and added a subsection on it * added uuid bluehawked snippet + readded uuid to toc * added uuid examples * removed uuid from field types as a paragraph * update wording * update wording * fix passive voice * add specific uuid example * removed innacurate collections are homogenous (per mixed) * (DOCSP-14573): set data type (#1079) * added set examples + bluehawked * literal included set exampkes * added delete one set item example * fix typo * added descriptions to set * fix grammar * changed link + hunter to generic names * added capitalization to clearly define Realm Set as a term * fix wording + formatting" * clarified wording * fix literalincldue indentation * fix typo * more wording fixes * clean up realm object model for set wording * fix character names for examples * clarified traversal order wording * rst typo in <set> * changed set to mySet * fix overview wording * updated overview to be more clear on differences between array * updated create wording * Update source/examples/generated/node/data-types.codeblock.remove-all-items-from-set.js Co-authored-by: Kenneth Geisshirt <k@zigzak.net> * Update source/examples/generated/node/data-types.codeblock.remove-specific-item-from-set.js Co-authored-by: Kenneth Geisshirt <k@zigzak.net> * Update source/sdk/node/data-types/sets.txt Co-authored-by: Kenneth Geisshirt <k@zigzak.net> * fix grammar + wording + changed Set to Realm.Set in js snippets * Fix woridng Co-authored-by: Kenneth Geisshirt <k@zigzak.net> * fill out field types * add react native data types as a copy of node data types * add data types to toc * fix rn mixed links * attempt to add realm-js links * more grammar and woridng fixes * wording fixes * Update source/sdk/node/data-types/uuid.txt Co-authored-by: nate contino <nathan.contino@mongodb.com> * change uuid note on rn to match node * added note about obj id to both rn and node * Update source/sdk/node/data-types/mixed.txt Co-authored-by: nate contino <nathan.contino@mongodb.com> * fix 'mixed' formatting on rn to match node * change monospace to bold * fix spacing errors * fix wording * correct supported types for mixed * wording update Co-authored-by: Mohammad Hunan Chughtai <mohammad.hunan@mongodb.com> Co-authored-by: Dachary <dc@dacharycarey.com> Co-authored-by: Kenneth Geisshirt <k@zigzak.net> Co-authored-by: nate contino <nathan.contino@mongodb.com>
Pull Request Info
Jira
Staged Changes (Requires MongoDB Corp SSO)
Review Guidelines
REVIEWING.md