OpenDatabaseConfiguration

open class OpenDatabaseConfiguration: Configuration

Database configuration class used when opening a database

  • Initializes a DatabaseConfiguration

    Important

    Database names are restricted to using only the following characters: abcdefghijklmnopqrstuvwxyz0123456789_$()+-/

    Declaration

    Swift

    public init(name: String? = nil, fileLocation: URL? = nil, indexes: [Indexer] = [], completionQueue: DispatchQueue = DispatchQueue.main)

    Parameters

    name

    Name of database. If nil, the value returned from defaultDatabaseName is used. Database names are restricted to using only the following characters: abcdefghijklmnopqrstuvwxyz0123456789_$()+-/

    fileLocation

    Local file URL of database files. If nil, the value returned from defaultLocation is used.

    indexes

    Indexes associated with this database. See Indexer protocol and Database.Index class.

    completionQueue

    A dispatch queue for scheduling completion handlers. Defaults to the main queue

  • Returns a default OpenDatabaseConfiguration

    Declaration

    Swift

    public static var `default`: OpenDatabaseConfiguration