Fields and Key-Values
Field Property
Similar to most document-oriented databases, you can only use strings to encode field names in documents.
If you attempt to insert a type other than a string for a field property, as demonstrated in the following snippet, you will receive an error message:
{
1: "numeric_fields_are_invalid_here",
"this_part": "numeric_fields_are_valid_here"
}Field Values
Values can be encoded using various data types, providing flexibility in representing a wide range of information; however, the supported data types depend on the type of CRDT you are using:
- For a register, use any type: such as strings, numbers, objects, or even binary data.
- For a counter, use only a number.
- If embedding a map, use key-value pairs within the embedded structure.
For an overview of write behavior by type, see Data Types.
Sorting by Field
Limiting by Field
Map Key-Value Pairs
Establishes a parent-child hierarchy between data elements where the key serves as the parent and the associated values for the children to link related data items as well as organize them in a structure that enhances the efficiency of lookup.
For more information, see Relationships.