Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

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

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
import * as netzo from "https://deno.land/x/netzo@0.4.87/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.