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 from the Realm.
When using Realm, Property
instances allow performing migrations and introspecting the database’s schema.
These 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 indexed: 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 optional: Bool
-
Declaration
Swift
public var objectClassName: String?
-
Returns a human-readable description of this property.
Declaration
Swift
public var description: String