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()

Initializes a DatabaseConfiguration with default values.

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.

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
Link copied to clipboard

Advises Core to enable or disable memory-mapped Database files, if possible. Memory-mapped database files are, currently, enabled by default, except on macOS where they cannot be enabled at all.

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
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 a CouchbaseLiteError will be thrown.

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

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.

Link copied to clipboard
actual fun setMMapEnabled(mmapEnabled: Boolean): DatabaseConfiguration
expect fun setMMapEnabled(mmapEnabled: Boolean): DatabaseConfiguration

Advises Core to enable or disable memory-mapped Database files, if possible. Memory-mapped database files are, currently, enabled by default, except on macOS where they cannot be enabled at all.

actual fun setMMapEnabled(mmapEnabled: Boolean): DatabaseConfiguration
actual fun setMMapEnabled(mmapEnabled: Boolean): DatabaseConfiguration
Link copied to clipboard
open override fun toString(): String
open override fun toString(): String