Skip to main content
Home
This release is 3 versions behind 0.30.0 — the latest version of @kitsonk/kv-toolbox. Jump to latest

Built and signed on GitHub Actions

Utilities for working with Deno KV. Encrypted values, batching atomic transactions, handling blobs, querying/filtering, and more.

This package works with Node.js, Deno, Bun, Browsers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a month ago (0.29.0)
method BatchedAtomicOperation.prototype.commit
BatchedAtomicOperation.prototype.commit(): Promise<(Deno.KvCommitResult | Deno.KvCommitError)[]>

Commit the operation to the KV store. Returns an array of values indicating whether checks passed and mutations were performed. If the operation failed because of a failed check, the last element of the return value will be a Deno.KvCommitError with an ok: false property. If the operation failed for any other reason (storage error, invalid value, etc.), the promise will be rejected with an exception. If the operation succeeded, the return value will be an individual Deno.KvCommitResult object with a ok: true property and the versionstamp of the value committed to KV broken up by the batch size, which defaults to 10.

If the commit returns ok: false, 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.

Return Type

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@kitsonk/kv-toolbox

Import symbol

import { BatchedAtomicOperation } from "@kitsonk/kv-toolbox/batched_atomic";
or

Import directly with a jsr specifier

import { BatchedAtomicOperation } from "jsr:@kitsonk/kv-toolbox/batched_atomic";

Add Package

pnpm i jsr:@kitsonk/kv-toolbox
or (using pnpm 10.8 or older)
pnpm dlx jsr add @kitsonk/kv-toolbox

Import symbol

import { BatchedAtomicOperation } from "@kitsonk/kv-toolbox/batched_atomic";

Add Package

yarn add jsr:@kitsonk/kv-toolbox
or (using Yarn 4.8 or older)
yarn dlx jsr add @kitsonk/kv-toolbox

Import symbol

import { BatchedAtomicOperation } from "@kitsonk/kv-toolbox/batched_atomic";

Add Package

vlt install jsr:@kitsonk/kv-toolbox

Import symbol

import { BatchedAtomicOperation } from "@kitsonk/kv-toolbox/batched_atomic";

Add Package

npx jsr add @kitsonk/kv-toolbox

Import symbol

import { BatchedAtomicOperation } from "@kitsonk/kv-toolbox/batched_atomic";

Add Package

bunx jsr add @kitsonk/kv-toolbox

Import symbol

import { BatchedAtomicOperation } from "@kitsonk/kv-toolbox/batched_atomic";