Closed michaelfig closed 6 years ago
The mysqljs connection.query method, when not given a callback function, returns an object used for the streaming interface: https://github.com/mysqljs/mysql#streaming-query-rows
Unfortunately, this API conflicts with the promise-mysql convention of returning a promise when there is no callback function.
This solution is to reexport the original query function under the queryStream name, so it can be used when the streaming interface is desired.
The mysqljs connection.query method, when not given a callback function, returns an object used for the streaming interface: https://github.com/mysqljs/mysql#streaming-query-rows
Unfortunately, this API conflicts with the promise-mysql convention of returning a promise when there is no callback function.
This solution is to reexport the original query function under the queryStream name, so it can be used when the streaming interface is desired.