AnyRealmValue
public enum AnyRealmValue : Hashable
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.
AnyRealmValue can also store a collection (List, Dictionary) of AnyRealmValue, meaning that you can have
nested collections inside a AnyRealmValue.
-
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) -
Dictionary type.
Declaration
Swift
case dictionary(Map<String, AnyRealmValue>) -
List type.
Declaration
Swift
case list(List<AnyRealmValue>) -
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
Map<String, AnyRealmValue>if that is what the stored value is, otherwisenil.Declaration
Swift
public var dictionaryValue: Map<String, AnyRealmValue>? { get } -
Returns a
List<AnyRealmValue>if that is what the stored value is, otherwisenil.Declaration
Swift
public var listValue: List<AnyRealmValue>? { get } -
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()
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
View on GitHub
Install in Dash