Schema
public final class Schema: CustomStringConvertible
Schema
instances represent collections of model object schemas persisted to a Realm.
When using Realm, Schema
instances allow performing migrations and
introspecting the database’s schema.
Schemas map to collections of tables in the core database.
-
Looks up and returns an
ObjectSchema
for the given class name in the Realm, if it exists.Declaration
Swift
public subscript(className: String) -> ObjectSchema?
-
An array of
ObjectSchema
s for all object types in the Realm.This property is intended to be used during migrations for dynamic introspection.
Declaration
Swift
public var objectSchema: [ObjectSchema]
-
Returns a human-readable description of the object schemas contained in this schema.
Declaration
Swift
public var description: String