kysely
Version:
Type safe SQL query builder
10 lines (9 loc) • 453 B
TypeScript
import type { DatabaseConnection } from './database-connection.js';
import type { AbortableOperationOptions } from '../util/abort.js';
export interface ConnectionProvider {
/**
* Provides a connection for the callback and takes care of disposing
* the connection after the callback has been run.
*/
provideConnection<T>(consumer: (connection: DatabaseConnection) => Promise<T>, options?: AbortableOperationOptions): Promise<T>;
}