import { Kysely as K } from 'kysely';
import postgres, { type Sql } from 'postgres';
export type { ColumnType, Expression, ExpressionBuilder, ExpressionOrFactory, Generated, Insertable, JSONColumnType, OperandExpression, Selectable, SqlBool, Updateable, } from 'kysely';
export * from './v1.generated';
import type { DB } from './v1.generated';
export { sql } from 'kysely';
export type Kysely = K<DB>;
export type Postgres = Sql;
export declare function useKysely(postgres: Sql): K<DB>;
export declare function usePostgres(connectionString: string, ssl?: boolean): postgres.Sql<{}>;
export declare class DatabaseError extends Error {
    constructor(message: string, cause: any);
}
export declare function withStack<T>(a: Promise<T>): Promise<T>;
