ObjectSchema

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.

Properties

  • 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 }

Property Retrieval

Equatable

  • Returns whether the two object schemas are equal.

    Declaration

    Swift

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