Class

CollectionManager

CollectionManager

CollectionManager allows the management of collections within a Bucket.

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>

View Source collectionmanager.js, line 44

Promise.<boolean>

# 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>

View Source collectionmanager.js, line 164

Promise.<boolean>

# 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>

View Source collectionmanager.js, line 116

Promise.<boolean>

# 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>

View Source collectionmanager.js, line 217

Promise.<boolean>