RealmConfiguration

A Realm Configuration defining specific setup and configuration for a Realm instance.

The RealmConfiguration can, for simple uses cases, be created directly through the constructor. More advanced setup requires building the RealmConfiguration through RealmConfiguration.Builder.build.

See also

Types

Link copied to clipboard

Used to create a RealmConfiguration. For common use cases, a RealmConfiguration can be created using the RealmConfiguration.create function.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Callback that determines if the realm file should be compacted as part of opening it.

Link copied to clipboard

Flag indicating whether the realm will be deleted if the schema has changed in a way that requires schema migration.

Link copied to clipboard
abstract val encryptionKey: ByteArray?

64 byte key used to encrypt and decrypt the Realm file.

Link copied to clipboard

Callback that will be triggered in order to write initial data when the Realm file is created for the first time.

Link copied to clipboard

Configuration that holds details of a bundled asset file used as initial state of the realm file. See SharedBuilder.initialRealmFile for details. null is returned if no initial realm file has been configured.

Link copied to clipboard
abstract val inMemory: Boolean

Describes whether the realm should reside in memory or on disk.

Link copied to clipboard
abstract val log: LogConfiguration

The log configuration used for the realm instance.

Link copied to clipboard

Maximum number of active versions.

Link copied to clipboard
abstract val name: String

Filename of the realm file.

Link copied to clipboard
abstract val path: String

Path to the realm file.

Link copied to clipboard
abstract val schema: Set<KClass<out BaseRealmObject>>

The set of classes included in the schema for the realm.

Link copied to clipboard
abstract val schemaVersion: Long

The schema version.