Counts the number of entries in a bucket (optionally filtering by pattern).
Optional
keyPattern: stringOptional key pattern to filter by
%
: A percent sign (%) matches any sequence of zero or more characters._
: An underscore (_) matches any single character.To match _ and % as literals escape them with backslash (\_
and \%
).
Number of entries
Deletes all entries (optionally filtering by pattern) permanently.
Optional
keyPattern: stringOptional key pattern to filter by
%
: A percent sign (%) matches any sequence of zero or more characters._
: An underscore (_) matches any single character.To match _ and % as literals escape them with backslash (\_
and \%
).
Number of deleted entries
Atomically increments the value stored at key. If the entry did not exist beforehand a new one is created and set to amount
The key whose value to increment
The amount to increment the value by
The entry after incrementing the value
Retrieve a list of entries from the database, you can use after
to paginate through all the items in the bucket.
Pagination options
A list of entries
Store a value at the provided key in the bucket, this will overwrite the previous value stored there, if any.
The key that you're storing the value in
The value you're storing, for objects this will be converted to json behind the scenes
Optional
options: SetValueOptionsOptional options
The storage entry
Similar to set but stores the value conditionally.
The key where you're storing the value
The value you're storing, for objects this will be converted to json behind the scenes
The condition that has to pass to store the value.
Optional
options: SetValueOptionsOptional options
Either the new entry, or undefined if the condition failed.
Returns a list of entries in the bucket sorted by values
The order of which you want the entries in the bucket sorted by
Optional
options: SortedListOptionsPagination options
Generated using TypeDoc
A Bucket holding number values
The values being numbers allows them to be sorted easily giving you access to incr and sortedList.
{@see } Bucket for more info on buckets.