RealmConfiguration

interface RealmConfiguration : Configuration

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

Builder
Link copied to clipboard
Companion
Link copied to clipboard
object Companion

Properties

compactOnLaunchCallback
Link copied to clipboard
abstract val compactOnLaunchCallback: CompactOnLaunchCallback?
Callback that determines if the realm file should be compacted as part of opening it.
deleteRealmIfMigrationNeeded
Link copied to clipboard
abstract val deleteRealmIfMigrationNeeded: Boolean
Flag indicating whether the realm will be deleted if the schema has changed in a way that requires schema migration.
encryptionKey
Link copied to clipboard
abstract val encryptionKey: ByteArray?
64 byte key used to encrypt and decrypt the Realm file.
initialDataCallback
Link copied to clipboard
abstract val initialDataCallback: InitialDataCallback?
Callback that will be triggered in order to write initial data when the Realm file is created for the first time.
log
Link copied to clipboard
abstract val log: LogConfiguration
The log configuration used for the realm instance.
maxNumberOfActiveVersions
Link copied to clipboard
abstract val maxNumberOfActiveVersions: Long
Maximum number of active versions.
name
Link copied to clipboard
abstract val name: String
Filename of the realm file.
path
Link copied to clipboard
abstract val path: String
Path to the realm file.
schema
Link copied to clipboard
abstract val schema: Set<KClass<out BaseRealmObject>>
The set of classes included in the schema for the realm.
schemaVersion
Link copied to clipboard
abstract val schemaVersion: Long
The schema version.