import { listItemsByUser } from "https://deno.land/x/netzo@0.2.84/plugins/portals/utils/db.ts";
Returns a Deno.KvListIterator
which can be used to iterate over
the items by a given user in the database, in chronological order.
Examples
Example 1
Example 1
import { listItemsByUser } from "netzo/plugins/portals/utils/db.ts";
for await (const entry of listItemsByUser("pedro")) {
entry.value.id; // Returns "01H9YD2RVCYTBVJEYEJEV5D1S1"
entry.value.userLogin; // Returns "pedro"
entry.key; // Returns ["items_voted_by_user", "01H9YD2RVCYTBVJEYEJEV5D1S1", "pedro"]
entry.versionstamp; // Returns "00000000000000010000"
}
Parameters
optional
options: Deno.KvListOptions