import { QueryResult } from '../driver/database-connection.js' ; import { CompiledQuery } from '../query-compiler/compiled-query.js' ; import { QueryExecutor } from './query-executor.js' ; import { KyselyPlugin } from '../plugin/kysely-plugin.js' ; /**
 * A  QueryExecutor subclass that can be used when you don't
 * have a  QueryCompiler ,  ConnectionProvider or any
 * other needed things to actually execute queries.
  export class NoopQueryExecutor extends QueryExecutor { compileQuery ( ) { throw new Error ( 'this query cannot be compiled to SQL' ) ; } protected async executeQueryImpl < R > ( ) { throw new Error ( 'this query cannot be executed' ) ; } withConnectionProvider ( ) { throw new Error ( 'this query cannot have a connection provider' ) ; } withPlugin ( plugin ) { return new NoopQueryExecutor ( [ ... this . plugins , plugin ] ) ; } withPluginAtFront ( plugin ) { return new NoopQueryExecutor ( [ plugin , ... this . plugins ] ) ; } withoutPlugins ( ) { return new NoopQueryExecutor ( [ ] ) ; } }