AnyRealmValue
A enum for storing and retrieving values associated with an AnyRealmValue
property.
-
Represents
nil
-
An integer type.
-
A boolean type.
-
A floating point numeric type.
-
A double numeric type.
-
A string type.
-
A binary data type.
-
A date type.
-
A Realm Object type.
-
An ObjectId type.
-
A Decimal128 type.
-
A UUID type.
-
Returns an
Int
if that is what the stored value is, otherwisenil
. -
Returns a
Bool
if that is what the stored value is, otherwisenil
. -
Returns a
Float
if that is what the stored value is, otherwisenil
. -
Returns a
Double
if that is what the stored value is, otherwisenil
. -
Returns a
String
if that is what the stored value is, otherwisenil
. -
Returns
Data
if that is what the stored value is, otherwisenil
. -
Returns a
Date
if that is what the stored value is, otherwisenil
. -
Returns an
ObjectId
if that is what the stored value is, otherwisenil
. -
Returns a
Decimal128
if that is what the stored value is, otherwisenil
. -
Returns a
UUID
if that is what the stored value is, otherwisenil
. -
Returns the stored value as a Realm Object of a specific type.
-
Returns a
DynamicObject
if the stored value is anObject
, otherwisenil
.Note: This allows access to an object stored in
AnyRealmValue
where 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 intoAnyRealmValue
and that class does not exist in version 1 use this accessor to gain access to the object in the Realm. -
Required for conformance to
AddableType