Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/netzo/core/plugins/auth/utils/db.ts

Deno-powered framework for building business web apps
Go to Latest
import * as netzo from "https://deno.land/x/netzo@0.3.91/core/plugins/auth/utils/db.ts";

Functions

Returns an array of values of a given Deno.KvListIterator that's been iterated over.

Creates a new user in the database. Throws if the user or user session already exists.

Gets the user with the given authId from the database.

Gets the user with the given session ID from the database. The first attempt is done with eventual consistency. If that returns null, the second attempt is done with strong consistency. This is done for performance reasons, as this function is called in every route request for checking whether the session user is signed in.

Returns a Deno.KvListIterator which can be used to iterate over the users in the database.

Creates a user in the database, overwriting any previous data.

Updates the session ID of a given user in the database.