Namespace: Databases-KeyValue

Databases.Databases-KeyValue

Key-Value database.

Source:

Extends

Methods

(async) all()

Returns all key/value pairs.

Source:
Returns:

[][string, string, string] An array of key/value pairs as key/value/hash entries.

(async) del(key)

Deletes a key/value pair from the store.

Parameters:
Name Type Description
key string

The key of the key/value pair to delete.

Source:

(async) get(key) → {*}

Gets a value from the store by key.

Parameters:
Name Type Description
key string

The key of the value to get.

Source:
Returns:

The value corresponding to key or null.

Type
*

(async, generator) iterator(filtersopt)

Iterates over keyvalue pairs.

Parameters:
Name Type Attributes Default Description
filters Object <optional>
{}

Various filters to apply to the iterator.

Properties
Name Type Attributes Default Description
amount string <optional>
-1

The number of results to fetch.

Source:
Yields:
[string, string, string] The next key/value as key/value/hash.

(async) put(key, value) → {string}

Stores a key/value pair to the store.

Parameters:
Name Type Description
key string

The key to store.

value *

The value to store.

Source:
Returns:

The hash of the new oplog entry.

Type
string