RealmConfiguration

interface 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

Builder
Link copied to clipboard

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

Companion
Link copied to clipboard
object Companion
SharedBuilder
Link copied to clipboard
abstract class SharedBuilder<T, S : RealmConfiguration.SharedBuilder<T, S>>(schema: Set<KClass<out RealmObject>>)

This class contains shared properties across the two types of configuration builders. Abstracting this allows for minimal rewiring by the compiler plugin since build is available to both builders.

Properties

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.

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 RealmObject>>

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

schemaVersion
Link copied to clipboard
abstract val schemaVersion: Long

The schema version.