Events database is an immutable, append-only event log database.
- Source:
Extends
Methods
(async) add(value) → {string}
Adds an event to the store.
Parameters:
Name | Type | Description |
---|---|---|
value |
* | The event to be added. |
- Source:
Returns:
The hash of the new oplog entry.
- Type
- string
(async) all()
Returns all events.
- Source:
Returns:
[][string, string] An array of events as hash/value entries.
(async) get(hash) → {*}
Gets an event from the store by hash.
Parameters:
Name | Type | Description |
---|---|---|
hash |
string | The hash of the event to get. |
- Source:
Returns:
The value corresponding to hash or null.
- Type
- *
(async, generator) iterator(filtersopt)
Iterates over events.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filters |
Object |
<optional> |
{} | Various filters to apply to the iterator. Properties
|
- Source:
Yields:
[string, string] The next event as hash/value.