import { DatabaseConnection , QueryResult } from './database-connection.js' ; import { Driver } from './driver.js' ; /**
 * A driver that does absolutely nothing.
 *
 * You can use this to create Kysely instances solely for building queries
 *
 * ### Examples
 *
 * This example creates a Kysely instance for building postgres queries:
 *
 * ```ts
 * const db = new Kysely<Database>({
 *   dialect: {
 *     createAdapter() {
 *       return new PostgresAdapter()
 *     },
 *     createDriver() {
 *       return new DummyDriver()
 *     },
 *     createIntrospector(db: Kysely<any>) {
 *       return new PostgresIntrospector(db)
 *     },
 *     createQueryCompiler() {
 *       return new PostgresQueryCompiler()
 *     },
 *   },
 * })
 * ```
 */ export class DummyDriver implements Driver { async init ( ) { } async acquireConnection ( ) { return new DummyConnection ( ) ; } async beginTransaction ( ) { } async commitTransaction ( ) { } async rollbackTransaction ( ) { } async releaseConnection ( ) { } async destroy ( ) { } } class DummyConnection implements DatabaseConnection { async executeQuery < R > ( ) { return { rows : [ ] , } ; } }