Skip to content

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
benmerckx committed Aug 30, 2024
1 parent 31123a9 commit a1bcef3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
Binary file modified bun.lockb
Binary file not shown.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"@cloudflare/workers-types": "^4.20230628.0",
"@electric-sql/pglite": "^0.1.5",
"@sqlite.org/sqlite-wasm": "^3.42.0-build4",
"@types/better-sqlite3": "^5.4.1",
"@types/bun": "^1.1.6",
"@types/glob": "^8.0.0",
"@types/pg": "^8.11.5",
"@types/sql.js": "^1.4.2",
"@types/better-sqlite3": "^7.6.11",
"@types/bun": "^1.1.8",
"@types/glob": "^8.1.0",
"@types/pg": "^8.11.8",
"@types/sql.js": "^1.4.9",
"better-sqlite3": "^11.2.1",
"esbuild": "^0.23.1",
"glob": "^11.0.0",
Expand Down
5 changes: 3 additions & 2 deletions src/driver/better-sqlite3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {execTransaction} from '../sqlite/transactions.ts'

class PreparedStatement implements SyncStatement {
constructor(
private stmt: Statement<Array<unknown>>,
private stmt: Statement,
private isSelection: boolean
) {}

Expand All @@ -29,7 +29,8 @@ class PreparedStatement implements SyncStatement {
}

values(params: Array<unknown>) {
if (this.isSelection) return this.stmt.raw(true).all(...params)
if (this.isSelection)
return this.stmt.raw(true).all(...params) as Array<Array<unknown>>
this.stmt.run(...params)
return []
}
Expand Down

0 comments on commit a1bcef3

Please sign in to comment.