DynamicMutableRealm

A dynamic mutable realm gives access and allows creation and modification of data in the realm through a generic string based API instead of the conventional Realm API that uses the typed API of the schema classes supplied in the configuration.

Properties

Link copied to clipboard

Configuration used to configure this Realm instance.

Functions

Link copied to clipboard
abstract fun copyToRealm(obj: DynamicRealmObject, updatePolicy: UpdatePolicy = UpdatePolicy.ERROR): DynamicMutableRealmObject

Copy new objects into the realm or update existing ones. The managed version of the object will be returned.

Link copied to clipboard
abstract fun delete(deleteable: Deleteable)

Delete objects from the underlying Realm.

abstract fun delete(className: String)

Deletes all objects of the specified class from the Realm.

Link copied to clipboard
abstract fun deleteAll()

Deletes all objects from the defined schema in the current Realm.

Link copied to clipboard

Get latest version of an object.

Link copied to clipboard

Returns the current number of active versions in the Realm file. A large number of active versions can have a negative impact on the Realm file size on disk.

Link copied to clipboard
abstract fun isClosed(): Boolean

Check if this Realm has been closed or not. If the Realm has been closed, most methods will throw IllegalStateException if called.

Link copied to clipboard
abstract override fun query(className: String, query: String, vararg args: Any?): RealmQuery<DynamicMutableRealmObject>

Returns a query for dynamic mutable realm objects of the specified class.

Link copied to clipboard
abstract fun schema(): RealmSchema

Returns an immutable schema of the realm.

Link copied to clipboard
abstract fun schemaVersion(): Long

Returns the schema version of the realm.

Link copied to clipboard
abstract fun version(): VersionId

Returns the Realm version of this object. This version number is tied to the transaction the object was read from.