Docs Menu

Docs HomeRealm

Field Types - React Native SDK

Realm Database supports the following field data types:

  • bool maps to the JavaScript Boolean type

  • int maps to the JavaScript Number type. Internally, Realm Database stores int with 64 bits.

  • float maps to the JavaScript Number type. Internally, Realm Database stores float with 32 bits.

  • double maps to the JavaScript Number type. Internally, Realm Database stores double with 64 bits.

  • string maps to the JavaScript String type.

  • decimal128 for high precision numbers.

  • objectId maps to BSON ObjectId type.

  • data maps to the JavaScript ArrayBuffer type.

  • date maps to the JavaScript Date type.

  • list maps to the JavaScript Array type. You can also specify that a field contains a list of primitive value type by appending [] to the type name.

  • linkingObjects is a special type used to define an inverse relationship.

  • dictionary used to manage a collection of unique String keys paired with values. The Dictionary data type is available in the realm-js@10.5.0 release.

  • set is based on the JavaScript Set type. Realm Set is available in the realm-js@10.5.0 release.

  • mixed is a property type that can hold different data types. The Mixed data type is available in the realm-js@10.5.0 release.

  • uuid is a universally unique identifier from Realm.BSON. The UUID data type is available in the realm-js@10.5.0 release.

←  Schemas Overview - React Native SDKCollections - React Native SDK →
Share Feedback
© 2023 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.