Add a new topic value by index.
Note that if the index already exists, this call will return an error. Use
set
instead if you wish to write the value regardless of whether
it already exists.
Clear all the loaded entries from this archivist instance
Note that this will not clear mutated entries; please use
reset()
if you wish to clear all data instead.
Delete a topic by index.
Commit all current changes to their respective vault backend(s)
Check whether a given exists in any of our vaults
Retrieve a value
This method is a wrapper around getValue
which directly returns ArchivistValue.value;
in most cases, you will want to call get
instead to get the actual data.
Retrieve the VaultValue object for a given key
In most cases, you will want to call get
instead to get the actual data.
Search the backend vault for matching indexes, and return them
In this case, the index can be partial; for instance, { userId: 1 }
, would match
all the following indexes:
{ userId: 1, somethingElse: 'hi'}
{ userId: 1, somethingElse: 'hello'}
Note that this API returns the list of matching indexes, not the data they hold;
please see scan()
if you wish to retrieve the data instead.
Retrieve multiple values
This method is a wrapper around mgetValue
which directly returns an array of ArchivistValue.value;
in most cases, you will want to call mget
instead to get the actual data.
Retrieve multiple VaultValue objects
In most cases, you will want to call mget
instead to get the actual data.
Reset the instance; remove all operations that are currently scheduled on the instance
Scan the backend vault for entries matching a given partial index.
In this case, the index can be partial; for instance, { userId: 1 }
, would match
all the following indexes:
{ userId: 1, somethingElse: 'hi'}
{ userId: 1, somethingElse: 'hello'}
Set the value for an existing index.
Touch a topic
Used to reset the expiration timer.
Abstracted data store access interface
In general, you will be accessing an archivist instance through a state object:
state.archivist.set('player', { userId: userId }, { name: 'someone' });