ObjectSchema
@frozen
public struct ObjectSchema : CustomStringConvertible
extension ObjectSchema: Equatable
This class represents Realm model object schemas.
When using Realm, ObjectSchema
instances allow performing migrations and introspecting the database’s schema.
Object schemas map to tables in the core database.
-
The name of the class the schema describes.
Declaration
Swift
public var className: String { get }
-
The object class the schema describes.
Declaration
Swift
public var objectClass: AnyClass { get }
-
The property which serves as the primary key for the class the schema describes, if any.
Declaration
Swift
public var primaryKeyProperty: Property? { get }
-
A human-readable description of the properties contained in the object schema.
Declaration
Swift
public var description: String { get }
-
Returns the property with the given name, if it exists.
Declaration
Swift
public subscript(propertyName: String) -> Property? { get }
-
Returns whether the two object schemas are equal.
Declaration
Swift
public static func == (lhs: ObjectSchema, rhs: ObjectSchema) -> Bool