How can I set up Sequelize.js to stream data instead of a promise / callback?

mysql, node.js, sequelize.js

Solution

There is a related GitHub for this. It doesn't look like it will happen in the near future.

For now I am monitoring my console, saving the query that Sequelize generates, and then refactoring my code to run the query with node-mysql.

connection.query(mySavedQuery).stream().pipe(...)

Problem

I am using `MySQL` and have a very large response (15,000+ rows). This takes.. well.. time. But I can start to process the first result right away. Can I set up a stream somehow with `sequelize`? If so, how?

Original source