Class: CouchDBKeyValueStore

CouchDBKeyValueStore

This is a sample database implementation of the KeyValueStore API. It uses a local or remote CouchDB database instance to store the keys.

new CouchDBKeyValueStore(options)

constructor
Parameters:
Name Type Description
options CouchDBOpts Settings used to connect to a CouchDB instance

Extends

Methods


getValue(name)

Get the value associated with name.
Parameters:
Name Type Description
name string Name of the key
Inherited From:
Overrides:
Returns:
Promise for the value corresponding to the key. If the value does not exist in the store, returns null without rejecting the promise
Type
Promise

setValue(name, value)

Set the value associated with name.
Parameters:
Name Type Description
name string Name of the key to save
value string The Value to save
Inherited From:
Overrides:
Returns:
Promise for the 'value' object upon successful write operation
Type
Promise