@couchbase/lite-js
    Preparing search index...

    Interface DatabaseConfig<Schema>

    Configuration for opening a Database.

    interface DatabaseConfig<Schema extends SchemaLike<Schema> = NoSchema> {
        collections: CollectionsConfig<Schema>;
        name: string;
        password?: string;
        version: number;
    }

    Type Parameters

    • Schema extends SchemaLike<Schema> = NoSchema

      The database schema: an interface type that maps collection names to the interfaces that represent their documents. Defaults to none.

    Index

    Properties

    The collections in the database. If Schema is given, there must be an entry for each collection name declared in the schema.

    name: string

    Name of the database, in the browser's local IndexedDB storage.

    password?: string

    The password to decrypt the database with, if it's encrypted. For security reasons this property is cleared when the database is opened.

    version: number

    The version number of this database configuration. This must be incremented whenever any collection configurations change.