Commit the operation to the KV store. Returns a value indicating whether
checks passed and mutations were performed. If the operation failed
because of a failed check, the return value will be null
. If the
operation failed for any other reason (storage error, invalid value,
etc.), an exception will be thrown. If the operation succeeded, the
return value will be a Deno.KvCommitResult
object containing
the versionstamp of the value committed to KV.
If the commit returns null
, one may create a new atomic operation with
updated checks and mutations and attempt to commit it again. See the note
on optimistic locking in the documentation for Deno.AtomicOperation
.
Returns
Promise<KvCommitResult | null>