From a1bcef39f4c98c6508354798837821395c8d0401 Mon Sep 17 00:00:00 2001 From: Ben Merckx Date: Fri, 30 Aug 2024 16:01:39 +0200 Subject: [PATCH] Update types --- bun.lockb | Bin 143473 -> 143143 bytes package.json | 10 +++++----- src/driver/better-sqlite3.ts | 5 +++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bun.lockb b/bun.lockb index 5aaa78b78e195a2e094af7eb74e7f65947fb9be3..44bba6ce25112574fc8f6887a7c7406a08330968 100755 GIT binary patch delta 2963 zcmcImYgAO%6+UNVUJQsp&;bGhX>koAFra`H6sg7sBF%~lzR*NbL6JA|P?@pD2x^gB zk^`~U#=2BQR2H?9g$Po!s!275gf!6xOH$KCAT3~<8kU0n_RJynNB?%OwePq0xA)!m zoPF=P=M4Ai&fM1>4KwZk+0vqOD>_dH?z>n!TApy~WA`h+Yg}Okof2rArUc};D53dr`aFy@ z7WX?Tc>yu{PIwF8aiuvbMz7w&*iv{Cl;+?Vbqc&hB|B)2z6KU$*?Ik^@FE=d1mYgd z)Dfe4OW?)XW8}RCF9x1Y$qS0n--0(Eo?2-RjB$5GCuUJ5Izj3fE2uwp8hr!UE5EE+K<#f&FkfR_l5DduT0s-aA!zhEw3 zu9ynvsgu#@)yj;*IqK7}R@$w{uwJrT%XTo9Vz-X{VD-aFwsSGrj3wEvedCtuc6Liv zv5!GdlNiNCt29}sC~a2V5@OVjFX(?Fg|sqGXm10MC}-wO(2ssG;x+&=Qru7sd- zi4}K72L7D4?k_ifJ@#t%yPxeoy(+xD?&9Y1L8E_wrFMr#TXtao=Cm~bBNtpBr{`X7 zT=r(jKz>f*V95Q|*Kdj*H8%<`XP(5@i*M9CRn%#?t4P*>*dXdPAQo#uj1uvRSfT~- zJrPY>5SzpZ5odKE*6ToIhz1>qG(8AcJx@yBN)3|Y6nEImOI6)&3atw6%bEVgnoq(b zUiPf+d3m_o>Gius^NLLui+8T7$o;mk@o~Kp-O}&2F0(N5J&(4#@hJgkb9eTOQ9U;% z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0%;HX@Vp42&p^s9mqU8-GPW(Ai@fOKZ%A{ag{W!`V>blrl fQRB?4%thj!hhh$Kd)64Y6%&u5$2rv~WrOB_@B_i) diff --git a/package.json b/package.json index b5795a8..0ce54f0 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/driver/better-sqlite3.ts b/src/driver/better-sqlite3.ts index 2dcd0e5..17eb491 100644 --- a/src/driver/better-sqlite3.ts +++ b/src/driver/better-sqlite3.ts @@ -12,7 +12,7 @@ import {execTransaction} from '../sqlite/transactions.ts' class PreparedStatement implements SyncStatement { constructor( - private stmt: Statement>, + private stmt: Statement, private isSelection: boolean ) {} @@ -29,7 +29,8 @@ class PreparedStatement implements SyncStatement { } values(params: Array) { - if (this.isSelection) return this.stmt.raw(true).all(...params) + if (this.isSelection) + return this.stmt.raw(true).all(...params) as Array> this.stmt.run(...params) return [] }