DatabaseConfiguration

actual class DatabaseConfiguration(config: DatabaseConfiguration?) : DelegatedClass<CBLDatabaseConfiguration> (source)

Configuration for opening a database.

actual class DatabaseConfiguration(config: DatabaseConfiguration?) : DelegatedClass<<Error class: unknown class>> (source)

Constructors

Link copied to clipboard
actual constructor()
actual constructor(config: DatabaseConfiguration?)
expect constructor()
expect constructor(config: DatabaseConfiguration?)

Copy constructor

actual constructor()
actual constructor(config: DatabaseConfiguration?)
actual constructor()
actual constructor(config: DatabaseConfiguration?)

Properties

Link copied to clipboard
actual var directory: String
expect var directory: String

The path to the directory that contains the database. If this path has not been set explicitly (see: setDirectory below), then it is the system default.

actual var directory: String
actual var directory: String
Link copied to clipboard
Link copied to clipboard
actual var isFullSync: Boolean
expect var isFullSync: Boolean

As Couchbase Lite normally configures its databases, there is a very small (though non-zero) chance that a power failure at just the wrong time could cause the most recently committed transaction's changes to be lost. This would cause the database to appear as it did immediately before that transaction. Setting this mode true ensures that an operating system crash or power failure will not cause the loss of any data. Full sync mode is very safe but it is also dramatically slower.

actual var isFullSync: Boolean
actual var isFullSync: Boolean

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int
Link copied to clipboard
fun DatabaseConfiguration?.newConfig(databasePath: String? = null, fullSync: Boolean? = null): DatabaseConfiguration
fun DatabaseConfiguration?.newConfig(databasePath: String? = null, fullSync: Boolean? = null, encryptionKey: EncryptionKey? = null): DatabaseConfiguration

Create a DatabaseConfiguration, overriding the receiver's values with the passed parameters:

Link copied to clipboard
actual fun setDirectory(directory: String): DatabaseConfiguration
expect fun setDirectory(directory: String): DatabaseConfiguration

Set the canonical path of the directory in which to store the database. If the directory doesn't already exist it will be created. If it cannot be created an IllegalStateException will be thrown.

actual fun setDirectory(directory: String): DatabaseConfiguration
actual fun setDirectory(directory: String): DatabaseConfiguration
Link copied to clipboard
Link copied to clipboard
actual fun setFullSync(isFullSync: Boolean): DatabaseConfiguration
expect fun setFullSync(isFullSync: Boolean): DatabaseConfiguration

As Couchbase Lite normally configures its databases, there is a very small (though non-zero) chance that a power failure at just the wrong time could cause the most recently committed transaction's changes to be lost. This would cause the database to appear as it did immediately before that transaction. Setting this mode true ensures that an operating system crash or power failure will not cause the loss of any data. Full sync mode is very safe but it is also dramatically slower.

actual fun setFullSync(isFullSync: Boolean): DatabaseConfiguration
actual fun setFullSync(isFullSync: Boolean): DatabaseConfiguration
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String