CoolFace
Apppublic

AK-21/Graphite-Industrial-Intelligence

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
driver.d.ts31 linesDownload Raw Back to bun-sql
1import type { SQLOptions } from 'bun';2import { SQL } from 'bun';3import { entityKind } from "../entity.js";4import { PgDatabase } from "../pg-core/db.js";5import { type DrizzleConfig } from "../utils.js";6import type { BunSQLQueryResultHKT } from "./session.js";7export declare class BunSQLDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends PgDatabase<BunSQLQueryResultHKT, TSchema> {8    static readonly [entityKind]: string;9}10export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends SQL = SQL>(...params: [11    TClient | string12] | [13    TClient | string,14    DrizzleConfig<TSchema>15] | [16    (DrizzleConfig<TSchema> & ({17        connection: string | ({18            url?: string;19        } & SQLOptions);20    } | {21        client: TClient;22    }))23]): BunSQLDatabase<TSchema> & {24    $client: TClient;25};26export declare namespace drizzle {27    function mock<TSchema extends Record<string, unknown> = Record<string, never>>(config?: DrizzleConfig<TSchema>): BunSQLDatabase<TSchema> & {28        $client: '$client is not available on drizzle.mock()';29    };30}31