import type { DatabaseConnection, QueryResult } from '../../driver/database-connection.js'; import type { Driver } from '../../driver/driver.js'; import type { CompiledQuery } from '../../query-compiler/compiled-query.js'; import type { QueryCompiler } from '../../query-compiler/query-compiler.js'; import { type AbortableOperationOptions } from '../../util/abort.js'; import type { PGlite, PGliteDialectConfig } from './pglite-dialect-config.js'; declare const PRIVATE_BEGIN_TRANSACTION_METHOD: unique symbol; declare const PRIVATE_COMMIT_TRANSACTION_METHOD: unique symbol; declare const PRIVATE_ROLLBACK_TRANSACTION_METHOD: unique symbol; export declare class PGliteDriver implements Driver { #private; constructor(config: PGliteDialectConfig); /** * Acquires a new connection from the pool. */ acquireConnection(): Promise; /** * Begins a transaction. */ beginTransaction(connection: PGliteConnection): Promise; /** * Commits a transaction. */ commitTransaction(connection: PGliteConnection): Promise; /** * Destroys the driver and releases all resources. */ destroy(): Promise; /** * Initializes the driver. * * After calling this method the driver should be usable and `acquireConnection` etc. * methods should be callable. */ init(options?: AbortableOperationOptions): Promise; /** * Releases a connection back to the pool. */ releaseConnection(): Promise; releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; /** * Rolls back a transaction. */ rollbackTransaction(connection: PGliteConnection): Promise; savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise; } declare class PGliteConnection implements DatabaseConnection { #private; constructor(pglite: PGlite); executeQuery(compiledQuery: CompiledQuery): Promise>; streamQuery(): AsyncIterableIterator>; [PRIVATE_BEGIN_TRANSACTION_METHOD](): Promise; [PRIVATE_COMMIT_TRANSACTION_METHOD](): Promise; [PRIVATE_ROLLBACK_TRANSACTION_METHOD](): Promise; } export {};