RLMSchema
@interface RLMSchema : NSObject <NSCopying>
This class represents the collection of model object schemas persisted to Realm.
When using Realm, RLMSchema objects allow performing migrations and introspecting the database’s schema.
Schemas map to collections of tables in the core database.
-
An NSArray containing RLMObjectSchema’s for all object types in this Realm. Meant to be used during migrations for dynamic introspection.
See
RLMObjectSchemaDeclaration
Objective‑C
@property (readonly, copy, nonatomic) NSArray *_Nonnull objectSchema;
-
Returns an RLMObjectSchema for the given class name in this RLMSchema.
See
Declaration
Objective‑C
- (nullable RLMObjectSchema *)schemaForClassName:(nonnull NSString *)className;
Parameters
className
The object class name.
Return Value
RLMObjectSchema for the given class in this RLMSchema.
-
Look up an RLMObjectSchema for the given class name in this Realm. Throws if there is no object of type className in this RLMSchema instance.
See
Declaration
Objective‑C
- (nonnull RLMObjectSchema *)objectForKeyedSubscript: (nonnull id<NSCopying>)className;
Parameters
className
The object class name.
Return Value
RLMObjectSchema for the given class in this Realm.
-
Returns YES if schema are equal
Declaration
Objective‑C
- (BOOL)isEqualToSchema:(nonnull RLMSchema *)schema;