Type Aliases

The following type aliases are available globally.

Aliases

  • PropertyType is an enum describing all property types supported in Realm models.

    For more information, see Realm Models.

    Primitive types

    • Int
    • Bool
    • Float
    • Double

    Object types

    Relationships: Array (in Swift, List) and Object types

    Declaration

    Swift

    public typealias PropertyType = RLMPropertyType
  • An opaque token which is returned from methods which subscribe to changes to a Realm.

    Declaration

    Swift

    public typealias NotificationToken = RLMNotificationToken
  • A Dictionary object representing a BSON document.

    Declaration

    Swift

    public typealias Document = Dictionary<String, AnyBSON?>
  • MaxKey will always be the greatest value when comparing to other BSON types

    Declaration

    Swift

    public typealias MaxKey = RLMMaxKey
  • MinKey will always be the smallest value when comparing to other BSON types

    Declaration

    Swift

    public typealias MinKey = RLMMinKey
  • The type of a migration block used to migrate a Realm.

    Declaration

    Swift

    public typealias MigrationBlock = (_ migration: Migration, _ oldSchemaVersion: UInt64) -> Void

    Parameters

    migration

    A Migration object used to perform the migration. The migration object allows you to enumerate and alter any existing objects which require migration.

    oldSchemaVersion

    The schema version of the Realm being migrated.

  • An object class used during migrations.

    Declaration

    Swift

    public typealias MigrationObject = DynamicObject
  • A block type which provides both the old and new versions of an object in the Realm. Object properties can only be accessed using subscripting.

    Declaration

    Swift

    public typealias MigrationObjectEnumerateBlock = (_ oldObject: MigrationObject?, _ newObject: MigrationObject?) -> Void

    Parameters

    oldObject

    The object from the original Realm (read-only).

    newObject

    The object from the migrated Realm (read-write).

  • The MongoClient enables reading and writing on a MongoDB database via the Realm Cloud service.

    It provides access to instances of MongoDatabase, which in turn provide access to specific MongoCollections that hold your data.

    Note

    Before you can read or write data, a user must log in.

    Declaration

    Swift

    public typealias MongoClient = RLMMongoClient
  • The MongoDatabase represents a MongoDB database, which holds a group of collections that contain your data.

    It can be retrieved from the MongoClient.

    Use it to get MongoCollections for reading and writing data.

    Note

    Before you can read or write data, a user must log in`.

    Declaration

    Swift

    public typealias MongoDatabase = RLMMongoDatabase
  • Options to use when executing a find command on a MongoCollection.

    Declaration

    Swift

    public typealias FindOptions = RLMFindOptions
  • Options to use when executing a findOneAndUpdate, findOneAndReplace, or findOneAndDelete command on a MongoCollection.

    Declaration

    Swift

    public typealias FindOneAndModifyOptions = RLMFindOneAndModifyOptions
  • The result of an updateOne or updateMany operation a MongoCollection.

    Declaration

    Swift

    public typealias UpdateResult = RLMUpdateResult
  • Block which returns an RLMObjectId on a successful insert, or an error should one occur.

    Declaration

    Swift

    public typealias MongoInsertBlock = RLMMongoInsertBlock
  • Block which returns an array of RLMObjectId’s on a successful insertMany, or an error should one occur.

    Declaration

    Swift

    public typealias MongoInsertManyBlock = RLMMongoInsertManyBlock
  • Block which returns an array of Documents on a successful find operation, or an error should one occur.

    Declaration

    Swift

    public typealias MongoFindBlock = RLMMongoFindBlock
  • Block which returns a Document on a successful findOne operation, or an error should one occur.

    Declaration

    Swift

    public typealias MongoFindOneBlock = RLMMongoFindOneBlock
  • Block which returns the number of Documents in a collection on a successful count operation, or an error should one occur.

    Declaration

    Swift

    public typealias MongoCountBlock = RLMMongoCountBlock
  • Block which returns an RLMUpdateResult on a successful update operation, or an error should one occur.

    Declaration

    Swift

    public typealias MongoUpdateBlock = (UpdateResult?, Error?) -> Void
  • Block which returns the deleted Document on a successful delete operation, or an error should one occur.

    Declaration

    Swift

    public typealias MongoDeleteBlock = RLMMongoDeleteBlock
  • The MongoCollection represents a MongoDB collection.

    You can get an instance from a MongoDatabase.

    Create, read, update, and delete methods are available.

    Operations against the Realm Cloud server are performed asynchronously.

    Note

    Before you can read or write data, a user must log in.

    Declaration

    Swift

    public typealias MongoCollection = RLMMongoCollection

Notifications

  • The type of a block to run for notification purposes when the data in a Realm is modified.

    Declaration

    Swift

    public typealias NotificationBlock = (_ notification: Realm.Notification, _ realm: Realm) -> Void
  • An object representing the Realm App configuration

    See

    RLMAppConfiguration

    Declaration

    Swift

    public typealias AppConfiguration = RLMAppConfiguration
  • An object representing a client which performs network calls on Realm Cloud user api keys

    See

    RLMUserAPIKeyProviderClient

    Declaration

    Swift

    public typealias UserAPIKeyProviderClient = RLMUserAPIKeyProviderClient
  • An object representing a client which performs network calls on Realm Cloud user registration & password functions

    See

    RLMUsernamePasswordProviderClient

    Declaration

    Swift

    public typealias UsernamePasswordProviderClient = RLMUsernamePasswordProviderClient
  • A block type used to report an error

    Declaration

    Swift

    public typealias UsernamePasswordProviderClientErrorBlock = RLMUsernamePasswordProviderClientOptionalErrorBlock
  • An object which is used within UserAPIKeyProviderClient

    See

    RLMUserAPIKey

    Declaration

    Swift

    public typealias UserAPIKey = RLMUserAPIKey
  • A AppCredentials represents data that uniquely identifies a Realm Object Server user.

    Declaration

    Swift

    public typealias AppCredentials = RLMAppCredentials
  • The RealmApp has the fundamental set of methods for communicating with a Realm application backend. This interface provides access to login and authentication.

    Declaration

    Swift

    public typealias RealmApp = RLMApp
  • An object representing a MongoDB Realm user.

    See

    RLMSyncUser

    Declaration

    Swift

    public typealias SyncUser = RLMSyncUser
  • An immutable data object representing information retrieved from MongoDB Realm about a particular user.

    See

    RLMSyncUserInfo

    Declaration

    Swift

    public typealias SyncUserInfo = RLMSyncUserInfo
  • An immutable data object representing an account belonging to a particular user.

    See

    SyncUserInfo, RLMSyncUserAccountInfo

    Declaration

    Swift

    public typealias SyncUserAccountInfo = RLMSyncUserAccountInfo
  • A singleton which configures and manages MongoDB Realm synchronization-related functionality.

    See

    RLMSyncManager

    Declaration

    Swift

    public typealias SyncManager = RLMSyncManager
  • Options for configuring timeouts and intervals in the sync client.

    See

    RLMSyncTimeoutOptions

    Declaration

    Swift

    public typealias SyncTimeoutOptions = RLMSyncTimeoutOptions
  • A session object which represents communication between the client and server for a specific Realm.

    See

    RLMSyncSession

    Declaration

    Swift

    public typealias SyncSession = RLMSyncSession
  • A closure type for a closure which can be set on the SyncManager to allow errors to be reported to the application.

    See

    RLMSyncErrorReportingBlock

    Declaration

    Swift

    public typealias ErrorReportingBlock = RLMSyncErrorReportingBlock
  • A closure type for a closure which is used by certain APIs to asynchronously return a SyncUser object to the application.

    See

    RLMUserCompletionBlock

    Declaration

    Swift

    public typealias UserCompletionBlock = RLMUserCompletionBlock
  • An error associated with the SDK’s synchronization functionality. All errors reported by an error handler registered on the SyncManager are of this type.

    See

    RLMSyncError

    Declaration

    Swift

    public typealias SyncError = RLMSyncError
  • An error associated with network requests made to the authentication server. This type of error may be returned in the callback block to SyncUser.logIn() upon certain types of failed login attempts (for example, if the request is malformed or if the server is experiencing an issue).

    See

    RLMSyncAuthError

    Declaration

    Swift

    public typealias SyncAuthError = RLMSyncAuthError
  • An enum which can be used to specify the level of logging.

    See

    RLMSyncLogLevel

    Declaration

    Swift

    public typealias SyncLogLevel = RLMSyncLogLevel
  • A data type whose values represent different authentication providers that can be used with MongoDB Realm.

    See

    RLMIdentityProvider

    Declaration

    Swift

    public typealias Provider = RLMIdentityProvider