Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is to possible add streaming query? #23

Closed
expertup opened this issue Jun 16, 2019 · 2 comments
Closed

Is to possible add streaming query? #23

expertup opened this issue Jun 16, 2019 · 2 comments

Comments

@expertup
Copy link

expertup commented Jun 16, 2019

I think about similar code:

var query = connection.query('SELECT * FROM posts');
query
  .on('error', function(err) {
    // Handle error, an 'end' event will be emitted after this as well
  })
  .on('fields', function(fields) {
    // the field packets for the rows to follow
  })
  .on('result', function(row) {
    // Pausing the connnection is useful if your processing involves I/O
    connection.pause();

    processRow(row, function() {
      connection.resume();
    });
  })
  .on('end', function() {
    // all rows have been received
  });

This is streaming query. I'm using them i my project.
Is any option to implement in this project?
Is any suggestions?

@daviemakz
Copy link
Owner

Hey,

It shouldn't be too much work to add in I think, i'll take a look at this for you.

Thanks,

David

@daviemakz
Copy link
Owner

Its possible to add however I have not found the time to do this yet. If you want to fork & submit a PR ill be happy to have a look and merge into the project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants