ObjectSchema

public final class ObjectSchema: CustomStringConvertible

This class represents Realm model object schemas.

When using Realm, ObjectSchema objects allow performing migrations and introspecting the database’s schema.

ObjectSchemas map to tables in the core database.

  • Returns the property with the given name, if it exists.

    Declaration

    Swift

    public subscript(propertyName: String) -> Property?
  • Array of persisted Property objects for an object.

    Declaration

    Swift

    public var properties: [Property]
  • The name of the class this schema describes.

    Declaration

    Swift

    public var className: String { return rlmObjectSchema.className }
  • The property that serves as the primary key, if there is a primary key.

    Declaration

    Swift

    public var primaryKeyProperty: Property?
  • Returns a human-readable description of the properties contained in this object schema.

    Declaration

    Swift

    public var description: String { return rlmObjectSchema.description }