@@ -33,36 +33,59 @@ const result = await db.exists();
3333
3434## database.createDatabase
3535
36+ ` async database.createDatabase(databaseName, options?): boolean `
37+
3638` async database.createDatabase(databaseName, users?): boolean `
3739
38- Creates a new database with the given _ databaseName_ and optionally creates
39- the given _ users_ for the new database.
40+ Creates a new database with the given _ databaseName_ with the given _ options_ .
4041
4142** Arguments**
4243
4344- ** databaseName** : ` string `
4445
4546 Name of the database to create.
4647
47- - ** users** : ` Array<object> ` (optional)
48+ - ** options** : ` object ` (optional)
49+
50+ An object with the following properties:
51+
52+ - ** users** : ` Array<object> ` (optional)
53+
54+ If specified, the array must contain objects with the following properties:
55+
56+ - ** username** : ` string `
57+
58+ The username of the user to create for the database.
59+
60+ - ** passwd** : ` string ` (Default: ` "" ` )
61+
62+ The password of the user.
63+
64+ - ** active** : ` boolean ` (Default: ` true ` )
65+
66+ Whether the user is active.
67+
68+ - ** extra** : ` object ` (optional)
4869
49- If specified, the array must contain objects with the following properties:
70+ An object containing additional user data.
5071
51- - ** username** : ` string `
72+ If ArangoDB is running in a cluster configuration, the object has the
73+ following additional properties:
5274
53- The username of the user to create for the database.
75+ - ** sharding ** : ` string ` (optional)
5476
55- - ** passwd ** : ` string ` (Default: ` "" ` )
77+ The sharding method to use for new collections in this database.
5678
57- The password of the user .
79+ One of ` "" ` , ` "flexible" ` or ` "single" ` .
5880
59- - ** active ** : ` boolean ` (Default: ` true ` )
81+ - ** replicationFactor ** : ` number | "satellite" ` (optional )
6082
61- Whether the user is active .
83+ Default replication factor for new collections in this database .
6284
63- - ** extra** : ` object ` (optional)
85+ Setting this to ` 1 ` disables replication. Setting this to ` "satellite" `
86+ will replicate to every DBServer.
6487
65- An object containing additional user data .
88+ If _ options _ is an array, it will be interpreted as _ options.users _ .
6689
6790** Examples**
6891
0 commit comments