import { Kysely as K, type Transaction as T } from 'kysely';
import postgres, { type Sql } from 'postgres';
export type { ColumnType, Expression, ExpressionBuilder, ExpressionOrFactory, Generated, Insertable, JSONColumnType, OperandExpression, Selectable, SelectQueryBuilder, SqlBool, Updateable, } from 'kysely';
export { jsonArrayFrom } from 'kysely/helpers/postgres';
export * from './v1.generated';
import type { DB } from './v1.generated';
export type Transaction = T<DB>;
export { sql } from 'kysely';
type PgOpt = {
    forceDisableSSL?: boolean;
    retries?: false | number;
};
export type Kysely = K<DB>;
export type Postgres = Sql;
/**
 * @deprecated This method is deprecated in favor of the useAsyncKysely method.
 */
export declare function useKysely(postgres: Sql, options?: {
    log?: boolean;
}): K<DB>;
export declare function useAsyncPostgres(connectionString: string, opt?: PgOpt): Promise<postgres.Sql<{}>>;
export declare function useAsyncKysely(connectionString: string, opt?: PgOpt): Promise<K<DB>>;
/**
 * @deprecated This method is deprecated in favor of the useAsyncKysely method.
 */
export declare function usePostgres(connectionString?: string, opt?: Pick<PgOpt, 'forceDisableSSL'>): postgres.Sql<{}>;
export declare function forceCloseAllPostgres(timeoutMs?: number): Promise<void>;
export declare class DatabaseError extends Error {
    constructor(message: string, cause: any);
}
export declare function withStack<T>(a: Promise<T>): Promise<T>;
