TenantAtlas/apps/platform/.pnpm-store/v10/files/62/3f094f09c6d8710d43fb9a581eedaaff3a8bcdc4dec2a3a4bbb92ce9a3ad0771638fdb65e81192d4efc2e2822bbb7ef01c5e8bbc363f2d87401cabe8806fb3
Ahmed Darrazi 9f74f7a658
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 51s
feat: compress governance operator outcomes
2026-04-19 14:15:11 +02:00

42 lines
1.8 KiB
Plaintext

import { sql } from '@vercel/postgres';
import type { Cache } from "../cache/core/cache.js";
import { entityKind } from "../entity.js";
import type { Logger } from "../logger.js";
import { PgDatabase } from "../pg-core/db.js";
import { PgDialect } from "../pg-core/index.js";
import { type RelationalSchemaConfig, type TablesRelationalConfig } from "../relations.js";
import { type DrizzleConfig } from "../utils.js";
import { type VercelPgClient, type VercelPgQueryResultHKT, VercelPgSession } from "./session.js";
export interface VercelPgDriverOptions {
logger?: Logger;
cache?: Cache;
}
export declare class VercelPgDriver {
private client;
private dialect;
private options;
static readonly [entityKind]: string;
constructor(client: VercelPgClient, dialect: PgDialect, options?: VercelPgDriverOptions);
createSession(schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined): VercelPgSession<Record<string, unknown>, TablesRelationalConfig>;
}
export declare class VercelPgDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends PgDatabase<VercelPgQueryResultHKT, TSchema> {
static readonly [entityKind]: string;
}
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends VercelPgClient = typeof sql>(...params: [] | [
TClient
] | [
TClient,
DrizzleConfig<TSchema>
] | [
(DrizzleConfig<TSchema> & ({
client?: TClient;
}))
]): VercelPgDatabase<TSchema> & {
$client: VercelPgClient extends TClient ? typeof sql : TClient;
};
export declare namespace drizzle {
function mock<TSchema extends Record<string, unknown> = Record<string, never>>(config?: DrizzleConfig<TSchema>): VercelPgDatabase<TSchema> & {
$client: '$client is not available on drizzle.mock()';
};
}