import { entityKind } from 'drizzle-orm/entity'; import type { MigrationConfig, MigrationMeta } from 'drizzle-orm/migrator'; import { PgDialect, type PgColumn, type PgTable } from 'drizzle-orm/pg-core'; import { SQL, type DriverValueEncoder, type QueryTypingsValue } from 'drizzle-orm'; import type { BuildRelationalQueryResult } from 'drizzle-orm/relations'; import { type QueryWithTypings } from 'drizzle-orm/sql/sql'; /** * Query typing for params bound to a non-array column. DuckDB sessions never * coerce these params from Postgres array literal strings. * @internal */ export declare const DUCKDB_SCALAR_COLUMN_TYPING: QueryTypingsValue; /** * DuckLake has no sequences, primary keys or indexes, so a journal in a * DuckLake catalog is a plain table. pg_duckdb and other clients without * duckdb_databases() use the regular journal. */ type MigrationSession = { execute(query: SQL): PromiseLike; all(query: SQL): PromiseLike; transaction(callback: (tx: { execute(query: SQL): PromiseLike; }) => Promise): Promise; }; export declare class DuckDBDialect extends PgDialect { private options; static readonly [entityKind]: string; private savepointsSupported; constructor(options?: ConstructorParameters[0] & { qualifyRawJoinColumns?: boolean; decimalMode?: 'number' | 'string'; }); /** * @deprecated Pg JSON/JSONB params now throw while the query is built. This * method is a no-op and will be removed in the next major version. */ resetPgJsonFlag(): void; /** * @deprecated Pg JSON/JSONB params now throw while the query is built. This * method is a no-op and will be removed in the next major version. */ markPgJsonDetected(): void; /** * @deprecated Pg JSON/JSONB params now throw while the query is built. This * method is a no-op and will be removed in the next major version. */ assertNoPgJsonColumns(): void; escapeName(name: string): string; /** * Check if savepoints are known to be unsupported for this dialect instance. */ areSavepointsUnsupported(): boolean; /** * Mark that savepoints are supported for this dialect instance. */ markSavepointsSupported(): void; /** * Mark that savepoints are not supported for this dialect instance. */ markSavepointsUnsupported(): void; migrate(migrations: MigrationMeta[], session: MigrationSession, config: MigrationConfig | string): Promise; prepareTyping(encoder: DriverValueEncoder): QueryTypingsValue; buildRelationalQueryWithoutPK(config: Parameters[0]): BuildRelationalQueryResult; sqlToQuery(sqlObj: SQL, invokeSource?: 'indexes' | undefined): QueryWithTypings; } export {};