AnyRealmValue
public enum AnyRealmValue : Hashable
extension AnyRealmValue: _Persistable, _DefaultConstructible
extension AnyRealmValue: _QueryNumeric
extension AnyRealmValue: RealmCollectionValue
extension AnyRealmValue: RealmPropertyType
extension AnyRealmValue: MinMaxType
extension AnyRealmValue: AddableType
extension AnyRealmValue: SortableType
A enum for storing and retrieving values associated with an AnyRealmValue property.
-
Represents
nilDeclaration
Swift
case none -
An integer type.
Declaration
Swift
case int(Int) -
A boolean type.
Declaration
Swift
case bool(Bool) -
A floating point numeric type.
Declaration
Swift
case float(Float) -
A double numeric type.
Declaration
Swift
case double(Double) -
A string type.
Declaration
Swift
case string(String) -
A binary data type.
Declaration
Swift
case data(Data) -
A date type.
Declaration
Swift
case date(Date) -
A Realm Object type.
Declaration
Swift
case object(Object) -
An ObjectId type.
Declaration
Swift
case objectId(ObjectId) -
A Decimal128 type.
Declaration
Swift
case decimal128(Decimal128) -
A UUID type.
Declaration
Swift
case uuid(UUID) -
Returns an
Intif that is what the stored value is, otherwisenil.Declaration
Swift
public var intValue: Int? { get } -
Returns a
Boolif that is what the stored value is, otherwisenil.Declaration
Swift
public var boolValue: Bool? { get } -
Returns a
Floatif that is what the stored value is, otherwisenil.Declaration
Swift
public var floatValue: Float? { get } -
Returns a
Doubleif that is what the stored value is, otherwisenil.Declaration
Swift
public var doubleValue: Double? { get } -
Returns a
Stringif that is what the stored value is, otherwisenil.Declaration
Swift
public var stringValue: String? { get } -
Returns
Dataif that is what the stored value is, otherwisenil.Declaration
Swift
public var dataValue: Data? { get } -
Returns a
Dateif that is what the stored value is, otherwisenil.Declaration
Swift
public var dateValue: Date? { get } -
Returns a
Decimal128if that is what the stored value is, otherwisenil.Declaration
Swift
public var decimal128Value: Decimal128? { get } -
Returns a
UUIDif that is what the stored value is, otherwisenil.Declaration
Swift
public var uuidValue: UUID? { get } -
Returns the stored value as a Realm Object of a specific type.
Declaration
Swift
public func object<T>(_ objectType: T.Type) -> T? where T : RealmSwiftObjectParameters
objectTypeThe type of the Object to return.
Return Value
A Realm Object of the supplied type if that is what the underlying value is, otherwise
nilis returned. -
Returns a
DynamicObjectif the stored value is anObject, otherwisenil.Note: This allows access to an object stored in
AnyRealmValuewhere you may not have the class information associated for it. For example if you are using Realm Sync and version 2 of your app sets an object intoAnyRealmValueand that class does not exist in version 1 use this accessor to gain access to the object in the Realm.Declaration
Swift
public var dynamicObject: DynamicObject? { get } -
Required for conformance to
AddableTypeDeclaration
Swift
public init()
-
Undocumented
Declaration
Swift
public static var _rlmType: PropertyType { get } -
Undocumented
Declaration
Swift
public static func _rlmPopulateProperty(_ prop: RLMProperty)
-
Undocumented
Declaration
Swift
public typealias PersistedType = AnyRealmValue -
Undocumented
Declaration
Swift
@inlinable public static func _rlmGetProperty(_ obj: ObjectBase, _ key: PropertyKey) -> AnyRealmValue -
Undocumented
Declaration
Swift
public static func _rlmSetProperty(_ obj: ObjectBase, _ key: PropertyKey, _ value: AnyRealmValue) -
Undocumented
Declaration
Swift
public static func _rlmSetAccessor(_ prop: RLMProperty) -
Undocumented
Declaration
Swift
public static func _rlmFromObjc(_ value: Any) -> `Self`? -
Undocumented
Declaration
Swift
public var _rlmObjcValue: Any { get }
View on GitHub
Install in Dash