lib/utils.ts

next-auth · packages/adapter-drizzle/src/lib/utils.ts · typescript · ISC
database, Database / ORM

utils.ts from nextauthjs/next-auth

// Source: https://github.com/nextauthjs/next-auth | License: ISC | Copyright 2022-2024, Balázs Orbán
// Provided via justclaw.it.com; keep this notice with the code.
import type {
  MySqlQueryResultHKT,
  PreparedQueryHKTBase,
} from "drizzle-orm/mysql-core"
import { MySqlDatabase } from "drizzle-orm/mysql-core"
import { PgDatabase, PgQueryResultHKT } from "drizzle-orm/pg-core"
import { BaseSQLiteDatabase } from "drizzle-orm/sqlite-core"
import { DefaultMySqlSchema } from "./mysql.js"
import { DefaultPostgresSchema } from "./pg.js"
import { DefaultSQLiteSchema } from "./sqlite.js"

type AnyPostgresDatabase = PgDatabase<PgQueryResultHKT, any>
type AnyMySqlDatabase = MySqlDatabase<
  MySqlQueryResultHKT,
  PreparedQueryHKTBase,
  any
>
type AnySQLiteDatabase = BaseSQLiteDatabase<"sync" | "a

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key