Removes a key
and its value from the database. Returns true
if there was a
key
to remove.
Get a single value from the database. If the key
is not present this
returns undefined
.
Determines if a single key
is present in the database.
Sets a single value
in the database. The value
will be encoded using
JSON.stringify
.
Gets many values from the database. This returns a ScanResult which
implements AsyncIterable
. It also has methods to iterate over the keys
and entries.
If options
has an indexName
, then this does a scan over an index with
that name. A scan over an index uses a tuple for the key consisting of
[secondary: string, primary: string]
.
If the ScanResult is used after the ReadTransaction
has been closed it
will throw a TransactionClosedError.
Generated using TypeDoc
WriteTransactions are used with Replicache.register and allows read and write operations on the database.