常量
以下常量全局可用。
-
当同一文件的写事务(write transaction)提交到不同线程上的Realm时,会发布此通知。
如果启用了
autorefresh
,或者在通知运行之前刷新了 Realm,则不会发布通知。禁用自动刷新的 Realm 通常应为此通知安装一个处理程序,该处理程序会在完成某些工作后调用
-[RLMRealm refresh]
。 刷新Realm是可选项,但不刷新Realm可能会导致Realm文件过大。 这是因为必须为过时的Realm保留一份额外的的数据副本。声明
Objective-C
extern NS_SWIFT_NAME(RefreshRequired) const RLMNotification RLMRealmRefreshRequiredNotification
Swift
static let RefreshRequired: RLMNotification
-
当针对同一文件的不同线程上的写事务提交到 Realm 时,Realm 会发布此通知。
如果启用了
-[RLMRealm autorefresh]
,或者在通知运行之前刷新了 Realm,则不会发布通知。禁用自动刷新的 Realm 通常应为此通知安装一个处理程序,该处理程序会在完成某些工作后调用
-[RLMRealm refresh]
。 刷新Realm是可选项,但不刷新Realm可能会导致Realm文件过大。 这是因为Realm必须为过时的Realm保留一份额外的的数据副本。声明
Objective-C
extern NS_SWIFT_NAME(DidChange) const RLMNotification RLMRealmDidChangeNotification
Swift
static let DidChange: RLMNotification
-
用于在错误的
userInfo
字典中识别关联备份Realm配置的键声明
Objective-C
extern NSString *const _Nonnull RLMBackupRealmConfigurationErrorKey
Swift
let RLMBackupRealmConfigurationErrorKey: String
-
用于未初始化 Realm 的模式版本
声明
Objective-C
extern const uint64_t RLMNotVersioned
Swift
let RLMNotVersioned: UInt64
-
相应的值是 Realm 抛出的异常的名称。
声明
Objective-C
extern NSString *const _Nonnull RLMExceptionName
Swift
let RLMExceptionName: String
-
对应的值为 Realm 文件版本。
声明
Objective-C
extern NSString *const _Nonnull RLMRealmVersionKey
Swift
let RLMRealmVersionKey: String
-
相应的键是底层数据库引擎的版本。
声明
Objective-C
extern NSString *const _Nonnull RLMRealmCoreVersionKey
Swift
let RLMRealmCoreVersionKey: String
-
相应的键是Realm失效属性名称。
声明
Objective-C
extern NSString *const _Nonnull RLMInvalidatedKey
Swift
let RLMInvalidatedKey: String
-
错误代码是 RLMError 枚举中的值。
声明
Objective-C
extern NSString *const RLMErrorDomain
Swift
let RLMErrorDomain: String
-
识别非特定系统错误的错误域。
声明
Objective-C
extern NSString *const RLMUnknownSystemErrorDomain
Swift
let RLMUnknownSystemErrorDomain: String
-
包含错误代码名称的用户信息键。 这仅用于调试目的,不应依赖。
声明
Objective-C
extern NSString *const RLMErrorCodeNameKey
Swift
let RLMErrorCodeNameKey: String