Calling connection.query
with an options object fails after a connection has been upgraded
#59
Labels
connection.query
with an options object fails after a connection has been upgraded
#59
Describe the bug
If a query connection has been upgraded, the corresponding query override function does not support all signatures of the initial query function. More specifically the third query signature form, is not working. This is the form which uses
.query(options, callback)
.query
but also forqueryRow
,queryHash
,queryCol
andqueryKeyValue
To Reproduce
query({sql: 'INSERT INTO ?? ..., values: [...]}, callbackFn)
values
are getting replaced by an empty array so the resulting query inside ofmysql
is malformed.Expected behavior
Expected the upgraded
connection.query
to work with the function signature form, which looks likequery(optionsObj, callbackFn)
mysql
- 2.18.1Additional context
The text was updated successfully, but these errors were encountered: