Property
public final class Property: CustomStringConvertible
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.
-
The name of the property.
Declaration
Swift
public var name: String
-
The type of the property.
Declaration
Swift
public var type: PropertyType
-
Indicates whether this property is indexed.
Declaration
Swift
public var isIndexed: Bool
-
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.)Declaration
Swift
public var isOptional: Bool
-
Declaration
Swift
public var objectClassName: String?
-
A human-readable description of the property object.
Declaration
Swift
public var description: String