RLMSchema
@interface RLMSchema : NSObject <NSCopying>
RLMSchema instances represent collections of model object schemas managed by a Realm.
When using Realm, RLMSchema instances allow performing migrations and
introspecting the database’s schema.
Schemas map to collections of tables in the core database.
-
An
NSArraycontainingRLMObjectSchemas for all object types in the Realm.This property is intended to be used during migrations for dynamic introspection.
See
RLMObjectSchemaDeclaration
Objective-C
@property (readonly, copy, nonatomic) NSArray<RLMObjectSchema *> *_Nonnull objectSchema;
-
Returns an
RLMObjectSchemafor the given class name in the schema.See
Declaration
Objective-C
- (nullable RLMObjectSchema *)schemaForClassName:(nonnull NSString *)className;Parameters
classNameThe object class name.
Return Value
An
RLMObjectSchemafor the given class in the schema. -
Looks up and returns an
RLMObjectSchemafor the given class name in the Realm.If there is no object of type
classNamein the schema, an exception will be thrown.See
Declaration
Objective-C
- (nonnull RLMObjectSchema *)objectForKeyedSubscript: (nonnull NSString *)className;Parameters
classNameThe object class name.
Return Value
An
RLMObjectSchemafor the given class in this Realm. -
Returns whether two
RLMSchemainstances are equivalent.Declaration
Objective-C
- (BOOL)isEqualToSchema:(nonnull RLMSchema *)schema;
View on GitHub
Install in Dash
RLMSchema Class Reference