Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function listItems
import { listItems } from "https://deno.land/x/netzo@0.2.94/plugins/portals/utils/db.ts";

Returns a Deno.KvListIterator which can be used to iterate over the items in the database, in chronological order.

Examples

Example 1

import { listItems } from "netzo/plugins/portals/utils/db.ts";

for await (const entry of listItems()) {
  entry.value.id; // Returns "01H9YD2RVCYTBVJEYEJEV5D1S1"
  entry.value.userLogin; // Returns "pedro"
  entry.key; // Returns ["items_voted_by_user", "01H9YD2RVCYTBVJEYEJEV5D1S1", "pedro"]
  entry.versionstamp; // Returns "00000000000000010000"
}