Optional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Remove the key/value pair with the given key from the database.
If the given key doesn't exist in the database, this operation doesn't fail; or rather, it fails silently, calling the resolve() method of its callback rather than reject(). If you want to know whether or not a key exists when deleting it, call the has() method first.
Enumerate key/value pairs, starting with the first key equal to or greater than the "from" key (inclusive) and ending with the last key less than the "to" key (exclusive) sorted lexicographically.
If either key is omitted, the range extends to the first and/or last key in the database.
Retrieve the value of the specified key from the database.
If the key/value pair doesn't exist in the database, and you specify
a default value, then the default value will be returned. Otherwise,
the callback's resolve() method will be called with a variant
of type VTYPE_EMPTY, which translates to the JS null
value.
Write multiple key/value pairs to the database.
It supports two types of write:
This features the "all-or-nothing" semantics, i.e. if any error occurs during the call, it will rollback the previous writes and terminate the call. In addition, writeMany should be more efficient than calling "put" or "delete" for every single key/value pair since it does all the writes in a single transaction.
Note:
Generated using TypeDoc
A key/value database.
All methods are asynchronous and take a callback as their first argument. The types of the callbacks vary, but they can all be implemented in JS via an object literal with the relevant methods.