Closed juicycool92 closed 1 year ago
I can confirm the same issue with the return type. The promise resolves with the UpsertResult
object (e. g. {"affectedRows":2,"insertId":"10","warningStatus":0}
), when inserting multiple values, not with an array of those.
Are there some cases for which it actually returns UpsertResult[]
?
I guess we need to use // @ts-ignore
for now, or override the interface?
mariadb version : 2.5.5
operating os : Windows 10
mariadb version :
3.0.0
operating os :ubuntu 20.04
Hello, thanks for nice module!
i have a question about types for
batch()
functionplease, see the look at my code screenshot first.
above code are working perfectly, and i want to look how many of rows are affected like this variable from this docs
but there is types error on my IDE![image](https://user-images.githubusercontent.com/12273678/158302999-06cff45c-6465-4c9f-a000-92cbc0bb91ca.png)
i checked d.ts file and this look like array![image](https://user-images.githubusercontent.com/12273678/158303089-2461a5ba-e565-40c6-8045-52b17c890460.png)
after that, i tried to log the result and what exactly result look like.
[2022-03-15T03:18:41+00:00][logger][error]: {"affectedRows":1,"insertId":"0","warningStatus":0}
so, it looks like there is type declare error or i might be doin wrong totally. can you help me what did i do wrong?
Thanks!