AK-21/Graphite-Industrial-Intelligence
0
1import { sql } from '@vercel/postgres';2import type { Cache } from "../cache/core/cache.cjs";3import { entityKind } from "../entity.cjs";4import type { Logger } from "../logger.cjs";5import { PgDatabase } from "../pg-core/db.cjs";6import { PgDialect } from "../pg-core/index.cjs";7import { type RelationalSchemaConfig, type TablesRelationalConfig } from "../relations.cjs";8import { type DrizzleConfig } from "../utils.cjs";9import { type VercelPgClient, type VercelPgQueryResultHKT, VercelPgSession } from "./session.cjs";10export interface VercelPgDriverOptions {11 logger?: Logger;12 cache?: Cache;13}14export declare class VercelPgDriver {15 private client;16 private dialect;17 private options;18 static readonly [entityKind]: string;19 constructor(client: VercelPgClient, dialect: PgDialect, options?: VercelPgDriverOptions);20 createSession(schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined): VercelPgSession<Record<string, unknown>, TablesRelationalConfig>;21}22export declare class VercelPgDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends PgDatabase<VercelPgQueryResultHKT, TSchema> {23 static readonly [entityKind]: string;24}25export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends VercelPgClient = typeof sql>(...params: [] | [26 TClient27] | [28 TClient,29 DrizzleConfig<TSchema>30] | [31 (DrizzleConfig<TSchema> & ({32 client?: TClient;33 }))34]): VercelPgDatabase<TSchema> & {35 $client: VercelPgClient extends TClient ? typeof sql : TClient;36};37export declare namespace drizzle {38 function mock<TSchema extends Record<string, unknown> = Record<string, never>>(config?: DrizzleConfig<TSchema>): VercelPgDatabase<TSchema> & {39 $client: '$client is not available on drizzle.mock()';40 };41}42 