Extensions
The following extensions are available globally.
-
This class represents the collection of model object schemas persisted to Realm.
When using Realm,
Schema
objects allow performing migrations and introspecting the database’s schema.Schemas map to collections of tables in the core database.
Declaration
Swift
public final class Schema : Printable
-
This class represents properties persisted to Realm in an ObjectSchema.
When using Realm, Property objects allow performing migrations and introspecting the database’s schema.
These properties map to columns in the core database.
Declaration
Swift
public final class Property : Printable
-
Undocumented
-
Undocumented
-
Types which can be used for min()/max().
Declaration
Swift
struct Int16 : SignedIntegerType
-
Types which can be used for min()/max().
Declaration
Swift
struct Int32 : SignedIntegerType
-
Types which can be used for min()/max().
Declaration
Swift
struct Int64 : SignedIntegerType
-
Types which can be used for min()/max().
Declaration
Swift
struct Int : SignedIntegerType
-
Undocumented
-
Results
is an auto-updating container type in Realm returned from object queries.Results can be queried with the same predicates as
List<T>
and you can chain queries to further filter query results.Results cannot be created directly.
See moreDeclaration
Swift
public final class Results<T : Object> : ResultsBase
-
A
See moreSortDescriptor
stores a property name and a sort order for use withsorted(sortDescriptors:)
. It is similar toNSSortDescriptor
, but supports only the subset of functionality which can be efficiently run by Realm’s query engine.Declaration
Swift
public struct SortDescriptor
-
List<T>
is the container type in Realm used to define to-many relationships.Lists hold a single
Object
subclass (T
) which defines thetype
of the list.Lists can be filtered and sorted with the same predicates as
Results<T>
.When added as a property on
See moreObject
models, the property must be declared aslet
and cannot bedynamic
.Declaration
Swift
public final class List<T : Object> : ListBase
-
A Realm instance (also referred to as
a realm
) represents a Realm database.Realms can either be stored on disk (see
init(path:)
) or in memory (seeinit(inMemoryIdentifier:)
).Realm instances are cached internally, and constructing equivalent Realm objects (with the same path or identifier) produces limited overhead.
If you specifically want to ensure a Realm object is destroyed (for example, if you wish to open a realm, check some property, and then possibly delete the realm file and re-open it), place the code which uses the realm within an
autoreleasepool {}
and ensure you have no other strong references to it.Declaration
Swift
public final class Realm
-
This class represents Realm model object schemas persisted to Realm in a Schema.
When using Realm, ObjectSchema objects allow performing migrations and introspecting the database’s schema.
Object schemas map to tables in the core database.
Declaration
Swift
public final class ObjectSchema : Printable