javascript - Need an example of Streaming mySql module with Node & Express -
can provide example of streaming large data sets 'mysql' module, node , express? there documentation, don't understand how query data in smaller segments because don't see examples. appreciated. query works, takes long time because table huge. query works, want request return lets 1,000 rows @ time can start populating data. link streaming queries documentation here. here code: const mysql = require('mysql'); const express = require('express'); const app = express(); const connection = mysql.createconnection({ host: 'us-cdbr-azure-east-a.cloudapp.net', database: 'eagertobp', user: ******, password: *******, port: '3306' }); connection.connect(function(err) { if(err) { console.log('error') } else { console.log('connected'); } }); app.get('/', function(req,resp) { connection.query("select * submissionanalytics"); console.log('test'); connection .