DynamicMutableRealm

interface DynamicMutableRealm : DynamicRealm

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.

Functions

createObject
Link copied to clipboard
abstract fun createObject(type: String): DynamicMutableRealmObject
Adds and returns a new object of the specified class to the Realm.
abstract fun createObject(type: String, primaryKey: Any?): DynamicMutableRealmObject
Adds and returns a new object of the specified class with the given primary key to the Realm.
delete
Link copied to clipboard
abstract fun delete(deleteable: Deleteable)
Delete objects from the underlying Realm.
findLatest
Link copied to clipboard
abstract fun findLatest(obj: RealmObject): DynamicMutableRealmObject?
Get latest version of an object.
getNumberOfActiveVersions
Link copied to clipboard
abstract fun getNumberOfActiveVersions(): Long
Returns the current number of active versions in the Realm file.
isClosed
Link copied to clipboard
abstract fun isClosed(): Boolean
Check if this Realm has been closed or not.
query
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.
schema
Link copied to clipboard
abstract fun schema(): RealmSchema
Returns an immutable schema of the realm.
schemaVersion
Link copied to clipboard
abstract fun schemaVersion(): Long
Returns the schema version of the realm.
version
Link copied to clipboard
abstract fun version(): VersionId
Returns the Realm version of this object.

Properties

configuration
Link copied to clipboard
abstract val configuration: Configuration
Configuration used to configure this Realm instance.