Skip to content

Commit

Permalink
docs: Correct code example for kv variable in manual (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsinalipro committed Sep 20, 2023
1 parent 2e2508d commit da5d207
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kv/manual/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ exists for the given key(s).

```ts
const kv = await Deno.openKv();
const result = await db.getMany([
const result = await kv.getMany([
["preferences", "ada"],
["preferences", "grace"],
]);
Expand All @@ -102,7 +102,7 @@ prefix.

```ts
const kv = await Deno.openKv();
const entries = db.list({ prefix: ["preferences"] });
const entries = kv.list({ prefix: ["preferences"] });
for await (const entry of entries) {
console.log(entry.key); // ["preferences", "ada"]
console.log(entry.value); // { ... }
Expand Down Expand Up @@ -133,7 +133,7 @@ No action is taken if no value is found for the given key.

```ts
const kv = await Deno.openKv();
await db.delete(["preferences", "alan"]);
await kv.delete(["preferences", "alan"]);
```

## Atomic transactions
Expand Down

0 comments on commit da5d207

Please sign in to comment.