• TeamSpeak has reported a vulnerability in it's client that can potentially lead to RCE. A new version has been released that fixes it. So please update the client in your bot installation as soon as possible as well. Click here for more information.
  • If you need help or want to discuss things, you now can also join us on our Discord Server!

Database exec multi parameters block callback

Mmoi

Member
Contributor
Hi,

Since the 1.0 beta3, the DBConn exec seem not to take the callback as a callback anymore. In fact, it is considered as a parameter and therefor crash the script.

Code:
dbConn.exec(table, function()
{
    sconomyLog(INFO, "Main table exists or created");
});
I get the following: 2019-06-29T22:32:31+02:00 error: sql: expected 0 arguments, got 1

Am I doing something wrong or is it broken?

Mmoi
 

Mmoi

Member
Contributor
And, regarding the note
Use this, if you expect a result set; Note: strings will be returned as byte arrays to be binary safe; to convert to actual strings, please use helpers.toString(column)
(cf here), the helpers.toString function seems to be broken too. This function just returns the original binary...
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Darn. Thanks for the feedback! I had to change a couple of things which probably affected those calls. Will fix it as soon as possible.
 
Top