Do it the normal way instead of the dumb way

This commit is contained in:
Alex Gleason 2023-08-06 22:29:56 -05:00
parent 781ca741dd
commit a4681e7281
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 4 deletions

View File

@ -61,13 +61,11 @@ class DenoSqliteConnection implements DatabaseConnection {
}
executeQuery<O>({ sql, parameters }: CompiledQuery): Promise<QueryResult<O>> {
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),