Realm supports the following field data types:
boolmaps to the JavaScript Boolean typeintmaps to the JavaScript Number type. Internally, Realm storesintwith 64 bits.floatmaps to the JavaScript Number type. Internally, Realm storesfloatwith 32 bits.doublemaps to the JavaScript Number type. Internally, Realm storesdoublewith 64 bits.stringmaps to the JavaScript String type.decimal128for high precision numbers.objectIdmaps to BSON ObjectId type.datamaps to the JavaScript ArrayBuffer type.datemaps to the JavaScript Date type.listmaps to the JavaScript Array type. You can also specify that a field contains a list of primitive value types by appending[]to the type name.linkingObjectsis a special type used to define an inverse relationship.dictionaryused to manage a collection of unique String keys paired with values. TheDictionarydata type is available in the realm-js@10.5.0 release.setis based on the JavaScript Set type.Realm Setis available in the realm-js@10.5.0 release.mixedis a property type that can hold different data types. TheMixeddata type is available in the realm-js@10.5.0 release.uuidis a universally unique identifier from Realm.BSON. TheUUIDdata type is available in the realm-js@10.5.0 release.counterfunctions as a logical counter when working with synchronized databases. Thecounterdata type and its associated class are available in the realm-js@12.10.0 release.
To learn how specific data types are mapped to BSON types in an App Services Schema, refer to Data Model Mapping in the Atlas App Services documentation.