Property

Property instances represent properties managed by a Realm in the context of an object schema. Such properties may be persisted to a Realm file or computed from other data in the Realm.

When using Realm, property instances allow performing migrations and introspecting the database’s schema.

Property instances map to columns in the core database.

Properties

  • The name of the property.

  • The column name of the property in the database. This will be the same as the property name when no private name is provided on the property mapping.

  • The type of the property.

  • Indicates whether this property is an array of the property type.

  • Indicates whether this property is a set of the property type.

  • Indicates whether this property is a dictionary of the property type.

  • Indicates whether this property is indexed.

  • Indicates whether this property is optional. (Note that certain numeric types must be wrapped in a RealmOptional instance in order to be declared as optional.)

  • For Object and List properties, the name of the class of object stored in the property.

  • A human-readable description of the property object.

Equatable

  • Returns whether the two properties are equal.