From a4681e72816cdd3c85f185cc52170a1db10d0509 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 6 Aug 2023 22:29:56 -0500 Subject: [PATCH] Do it the normal way instead of the dumb way --- lib/kysely-deno-sqlite/src/deno-sqlite-driver.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/kysely-deno-sqlite/src/deno-sqlite-driver.ts b/lib/kysely-deno-sqlite/src/deno-sqlite-driver.ts index b0d4655..adf49ab 100644 --- a/lib/kysely-deno-sqlite/src/deno-sqlite-driver.ts +++ b/lib/kysely-deno-sqlite/src/deno-sqlite-driver.ts @@ -61,13 +61,11 @@ class DenoSqliteConnection implements DatabaseConnection { } executeQuery({ sql, parameters }: CompiledQuery): Promise> { - const query = this.#db.prepareQuery(sql); + // @ts-expect-error `parameters` types are incompatible, but they should match in reality. + const rows = this.#db.queryEntries(sql, parameters); - const rows = query.allEntries(parameters as any); const { changes, lastInsertRowId } = this.#db; - query.finalize(); - return Promise.resolve({ rows: rows as O[], numAffectedRows: BigInt(changes),