ObjectSchema

public struct ObjectSchema : CustomStringConvertible

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.

  • An array of Property instances representing the managed properties of a class described by the schema.

    See

    Property

    Declaration

    Swift

    public var properties: [Property] { get }
  • 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 whether the two object schemas are equal.

    Declaration

    Swift

    public static func == (lhs: ObjectSchema, rhs: ObjectSchema) -> Bool