/opt/canhelp/node_modules/kysely/dist/cjs/dialect/postgres
Edit: /opt/canhelp/node_modules/kysely/dist/cjs/dialect/postgres/postgres-driver.d.ts (2439B)
import type { DatabaseConnection, QueryResult } from '../../driver/database-connection.js';
import type { Driver, TransactionSettings } from '../../driver/driver.js';
import { CompiledQuery } from '../../query-compiler/compiled-query.js';
import type { QueryCompiler } from '../../query-compiler/query-compiler.js';
import type { PostgresCursorConstructor, PostgresDialectConfig, PostgresPoolClient } from './postgres-dialect-config.js';
declare const PRIVATE_RELEASE_METHOD: unique symbol;
export declare class PostgresDriver implements Driver {
#private;
constructor(config: PostgresDialectConfig);
/**
* Initializes the driver.
*
* After calling this method the driver should be usable and `acquireConnection` etc.
* methods should be callable.
*/
init(): Promise
;
/**
* Acquires a new connection from the pool.
*/
acquireConnection(): Promise;
/**
* Begins a transaction.
*/
beginTransaction(connection: DatabaseConnection, settings: TransactionSettings): Promise;
/**
* Commits a transaction.
*/
commitTransaction(connection: DatabaseConnection): Promise;
/**
* Rolls back a transaction.
*/
rollbackTransaction(connection: DatabaseConnection): Promise;
savepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise;
rollbackToSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise;
releaseSavepoint(connection: DatabaseConnection, savepointName: string, compileQuery: QueryCompiler['compileQuery']): Promise;
/**
* Releases a connection back to the pool.
*/
releaseConnection(connection: PostgresConnection): Promise;
/**
* Destroys the driver and releases all resources.
*/
destroy(): Promise;
}
interface PostgresConnectionOptions {
cursor: PostgresCursorConstructor | null;
}
declare class PostgresConnection implements DatabaseConnection {
#private;
constructor(client: PostgresPoolClient, options: PostgresConnectionOptions);
executeQuery(compiledQuery: CompiledQuery): Promise>;
streamQuery(compiledQuery: CompiledQuery, chunkSize: number): AsyncIterableIterator>;
[PRIVATE_RELEASE_METHOD](): void;
}
export {};