feat(kv): AtomicOperation#sum (#18704)

This commit is contained in:
Ryan Dahl 2023-04-15 10:33:31 +02:00 committed by GitHub
parent 1bca994143
commit 2184103a5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View file

@ -1839,6 +1839,10 @@ declare namespace Deno {
* for {@linkcode Deno.KvMutation}.
*/
mutate(...mutations: KvMutation[]): this;
/**
* Shortcut for creating a sum mutation.
*/
sum(key: KvKey, n: bigint): this;
/**
* Add to the operation a mutation that sets the value of the specified key
* to the specified value if all checks pass during the commit.