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

Please update the documentation. Since Node v10.0.0, for-await-of is available. #189

Closed
ganlvtech opened this issue Jan 20, 2022 · 1 comment

Comments

@ganlvtech
Copy link

ganlvtech commented Jan 20, 2022

## `connection.queryStream(sql[, values]) → Emitter`

Since Node v10.0.0, for-await-of is available.

async function doSomeQuery() {
  const readable = connection.queryStream("SELECT * FROM mysql.user");
  for await (const row of readable) {
    console.log(row);
  }
}

See https://nodejs.org/api/stream.html#readablesymbolasynciterator

@rusher
Copy link
Collaborator

rusher commented Feb 8, 2023

closing since corrected last year

@rusher rusher closed this as completed Feb 8, 2023
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