Do it the normal way instead of the dumb way
This commit is contained in:
parent
781ca741dd
commit
a4681e7281
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue