Methods
# async createCollection(collectionSpec, optionsopt, callbackopt) → {Promise.<boolean>}
createCollection creates a collection within a scope in a bucket.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
collectionSpec |
* | The details of the collection to create. |
|
name |
string | The name of the collection to create. |
|
scopeName |
string | The name of the scope to create the collection in. |
|
maxExpiry |
string | The maximum expiry for documents in this bucket. |
|
options |
* |
<optional> |
|
timeout |
Number |
<optional> |
Timeout for the operation in milliseconds. |
callback |
CreateCollectionCallback |
<optional> |
# async createScope(scopeName, optionsopt, callbackopt) → {Promise.<boolean>}
createScope creates a scope within a bucket.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
scopeName |
string | The name of the scope to create. |
|
options |
* |
<optional> |
|
timeout |
Number |
<optional> |
Timeout for the operation in milliseconds. |
callback |
CreateScopeCallback |
<optional> |
# async dropCollection(collectionName, scopeName, optionsopt, callbackopt) → {Promise.<boolean>}
dropCollection drops a collection from a scope in a bucket.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
collectionName |
string | The name of the collection to drop. |
|
scopeName |
string | The name of the scope containing the collection to drop. |
|
options |
* |
<optional> |
|
timeout |
Number |
<optional> |
Timeout for the operation in milliseconds. |
callback |
DropCollectionCallback |
<optional> |
# async dropScope(scopeName, optionsopt, callbackopt) → {Promise.<boolean>}
dropScope drops a scope from a bucket.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
scopeName |
string | The name of the scope to drop. |
|
options |
* |
<optional> |
|
timeout |
Number |
<optional> |
Timeout for the operation in milliseconds. |
callback |
DropScopeCallback |
<optional> |