DatabaseConfiguration

public struct DatabaseConfiguration

Configuration for opening a database.

  • Path to the directory to store the database in.

    Declaration

    Swift

    public var directory: String
  • 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 synchronous is very safe but it is also dramatically slower.

    Declaration

    Swift

    public var fullSync: Bool
  • The key to encrypt the database with.

    Declaration

    Swift

    public var encryptionKey: EncryptionKey?
  • Initializes a DatabaseConfiguration’s builder with default values.

    Declaration

    Swift

    public init()
  • Initializes a DatabaseConfiguration’s builder with the configuration object.

    Declaration

    Swift

    public init(config: DatabaseConfiguration?)
  • [false] Full sync is off by default because the performance hit is seldom worth the benefit

    Declaration

    Swift

    static let defaultFullSync: Bool