Type alias CreateDatabaseOptions

CreateDatabaseOptions: {
    replicationFactor?: "satellite" | number;
    sharding?: "" | "flexible" | "single";
    users?: CreateDatabaseUser[];
    writeConcern?: number;
}

Options for creating a database.

See Database#createDatabase.

Type declaration

  • Optional replicationFactor?: "satellite" | number

    (Cluster only.) Default replication factor for new collections in this database.

    Setting this to 1 disables replication. Setting this to "satellite" will replicate to every DBServer.

  • Optional sharding?: "" | "flexible" | "single"

    (Cluster only.) The sharding method to use for new collections in the database.

  • Optional users?: CreateDatabaseUser[]

    Database users to create with the database.

  • Optional writeConcern?: number

    (Cluster only.) Default write concern for new collections created in this database.