Functions
The following functions are available globally.
-
Returns whether the two errors are identical
Declaration
Swift
public func == (lhs: ErrorType, rhs: ErrorType) -> Bool { // swiftlint:disable:this valid_docs
-
Explicitly implement pattern matching for
Realm.Error, so that the instances can be used in thedo … syntax.Declaration
Swift
public func ~= (lhs: Error, rhs: ErrorType) -> Bool { // swiftlint:disable:this valid_docs
-
Get the schema version for a Realm at a given path. - parameter realmPath: Path to a Realm file. - parameter encryptionKey: Optional 64-byte encryption key for encrypted Realms. - parameter error: If an error occurs, upon return contains an
NSErrorobject that describes the problem. If you are not interested in possible errors, omit the argument, or pass innil.Declaration
Swift
public func schemaVersionAtPath(realmPath: String, encryptionKey: NSData? = nil, error: NSErrorPointer = nil) -> UInt64?Parameters
realmPathPath to a Realm file.
encryptionKeyOptional 64-byte encryption key for encrypted Realms.
errorIf an error occurs, upon return contains an
NSErrorobject that describes the problem. If you are not interested in possible errors, omit the argument, or pass innil.Return Value
The version of the Realm at
realmPathornilif the version cannot be read. -
Performs the configuration’s migration block on the Realm created by the given configuration.
This method is called automatically when opening a Realm for the first time and does not need to be called explicitly. You can choose to call this method to control exactly when and how migrations are performed.
Declaration
Swift
public func migrateRealm(configuration: Realm.Configuration = Realm.Configuration.defaultConfiguration) -> NSError?Parameters
configurationThe Realm.Configuration used to create the Realm to be migrated, and containing the schema version and migration block used to perform the migration.
Return Value
nilif the migration was successful, or anNSErrorobject that describes the problem that occurred otherwise.
-
Returns whether the two object schemas are equal.
Declaration
Swift
public func == (lhs: ObjectSchema, rhs: ObjectSchema) -> Bool { // swiftlint:disable:this valid_docs
-
Returns whether the two properties are equal.
Declaration
Swift
public func == (lhs: Property, rhs: Property) -> Bool { // swiftlint:disable:this valid_docs
-
Returns whether the two realms are equal.
Declaration
Swift
public func == (lhs: Realm, rhs: Realm) -> Bool { // swiftlint:disable:this valid_docs
-
Returns whether the two schemas are equal.
Declaration
Swift
public func == (lhs: Schema, rhs: Schema) -> Bool { // swiftlint:disable:this valid_docs
-
Returns whether the two sort descriptors are equal.
Declaration
Swift
public func == (lhs: SortDescriptor, rhs: SortDescriptor) -> Bool
View on GitHub
Install in Dash
Functions Reference