CodeFoodPixels / node-promise-mysql

A wrapper for mysqljs/mysql that wraps function calls with Bluebird promises.
MIT License
338 stars 63 forks source link

Allow access to the streaming query interface #83

Closed michaelfig closed 6 years ago

michaelfig commented 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.

michaelfig commented 6 years ago

60