Docs Menu

Docs HomeRealm

Supported Types - Kotlin SDK

On this page

  • Updating Strings and Byte Arrays

Realm Database supports the following field data types:

  • String

  • Byte

  • Char

  • Short

  • Int

  • Long

  • Boolean

  • Double

  • Float

  • ObjectId

  • RealmInstant

  • Any RealmObject subclass

  • RealmList

  • RealmUUID

Realm Database stores all non-decimal numeric types as Long values. Similarly, Realm Database stores all decimal numeric types as Double values.

Realm Database does not support fields with modifiers final and volatile, though you can use fields with those modifiers if you ignore them. If you choose to provide custom constructors, you must declare a public constructor with no arguments.

Since Realm Database operates on fields as a whole, it's not possible to directly update individual elements of strings or byte arrays. Instead, you'll need to read the whole field, make your modification to individual elements, and then write the entire field back again in a transaction block.

←  Schemas - Kotlin SDKTimestamps - Kotlin SDK →
Give Feedback
© 2022 MongoDB, Inc.


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