Structures

The following structures are available globally.

  • Migration instances encapsulate information intended to facilitate a schema migration.

    A Migration instance is passed into a user-defined MigrationBlock block when updating the version of a Realm. This instance provides access to the old and new database schemas, the objects in the Realm, and provides functionality for modifying the Realm during the migration.

    See more

    Declaration

    Swift

    public struct Migration
  • This class represents Realm model object schemas.

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

    Object schemas map to tables in the core database.

    See more

    Declaration

    Swift

    public struct ObjectSchema : CustomStringConvertible
  • Property instances represent properties managed by a Realm in the context of an object schema. Such properties may be persisted to a Realm file or computed from other data in the Realm.

    When using Realm, property instances allow performing migrations and introspecting the database’s schema.

    Property instances map to columns in the core database.

    See more

    Declaration

    Swift

    public struct Property : CustomStringConvertible
  • Schema instances represent collections of model object schemas managed by 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.

    See more

    Declaration

    Swift

    public struct Schema : CustomStringConvertible
  • A SortDescriptor stores a key path and a sort order for use with sorted(sortDescriptors:). It is similar to NSSortDescriptor, but supports only the subset of functionality which can be efficiently run by Realm’s query engine.

    See more

    Declaration

    Swift

    public struct SortDescriptor
  • A SyncConfiguration represents configuration parameters for Realms intended to sync with a Realm Object Server.

    See more

    Declaration

    Swift

    public struct SyncConfiguration
  • A SyncCredentials represents data that uniquely identifies a Realm Object Server user.

    See more

    Declaration

    Swift

    public struct SyncCredentials
  • A description of the actual privileges which apply to a Realm.

    This is a combination of all of the privileges granted to all of the Roles which the current User is a member of, obtained by calling realm.getPrivileges().

    By default, all operations are permitted, and each privilege field indicates an operation which may be forbidden.

    See more

    Declaration

    Swift

    public struct RealmPrivileges : OptionSet, CustomDebugStringConvertible
  • A description of the actual privileges which apply to a Class within a Realm.

    This is a combination of all of the privileges granted to all of the Roles which the current User is a member of, obtained by calling realm.getPrivileges(ObjectClass.self) or realm.getPrivileges(forClassNamed: "className")

    By default, all operations are permitted, and each privilege field indicates an operation which may be forbidden.

    See more

    Declaration

    Swift

    public struct ClassPrivileges : OptionSet, CustomDebugStringConvertible
  • A description of the actual privileges which apply to a specific Object.

    This is a combination of all of the privileges granted to all of the Roles which the current User is a member of, obtained by calling realm.getPrivileges(object).

    By default, all operations are permitted, and each privilege field indicates an operation which may be forbidden.

    See more

    Declaration

    Swift

    public struct ObjectPrivileges : OptionSet, CustomDebugStringConvertible