import { kysely } from "https://dotland.deno.dev/x/kysely_postgrs_js_dialect@v0.27.3/deps.ts";
const { DefaultQueryExecutor } = kysely;
Constructors
new
DefaultQueryExecutor(compiler: QueryCompiler,
adapter: DialectAdapter,
connectionProvider: ConnectionProvider,
plugins?: KyselyPlugin[],
Methods
Compiles the transformed query into SQL. You usually want to pass the output of {@link transformQuery} into this method but you can compile any query using this method.
provideConnection<T>(consumer: (connection: DatabaseConnection) => Promise<T>): Promise<T>
Provides a connection for the callback and takes care of disposing the connection after the callback has been run.
withConnectionProvider(connectionProvider: ConnectionProvider): DefaultQueryExecutor
Returns a copy of this executor with a new connection provider.
withPlugin(plugin: KyselyPlugin): DefaultQueryExecutor
Returns a copy of this executor with a plugin added as the last plugin.
withPlugins(plugins: ReadonlyArray<KyselyPlugin>): DefaultQueryExecutor
Returns a copy of this executor with a list of plugins added as the last plugins.