UNPKG

kysely-pglite

Version:
20 lines (19 loc) 986 B
import { PGlite, PGliteInterfaceExtensions, type PGliteOptions } from '@electric-sql/pglite'; import { type Dialect } from 'kysely'; export declare class KyselyPGlite<O extends PGliteOptions = PGliteOptions> { client: PGlite & PGliteInterfaceExtensions<O['extensions']>; /** * Create a new KyselyPGlite instance. * @param dataDir The directory to store the database files. * - A string with `idb://` prefix to use IndexedDB filesystem in the browser * - `memory://` to use in-memory filesystem * - A path to a local filesystem directory * @param options `PGliteOptions` options */ constructor(dataDir?: string, opts?: O); constructor(options?: O); constructor(client?: PGlite); static create<O extends PGliteOptions>(options?: O): Promise<KyselyPGlite<O>>; static create<O extends PGliteOptions>(dataDir?: string, options?: O): Promise<KyselyPGlite<O>>; dialect: Dialect; }