knex / knex

A query builder for PostgreSQL, MySQL, CockroachDB, SQL Server, SQLite3 and Oracle, designed to be flexible, portable, and fun to use.
https://knexjs.org/
MIT License
19.39k stars 2.13k forks source link

Streaming example #5903

Open elhigu opened 4 years ago

elhigu commented 4 years ago

Moved issue from main repo to here https://github.com/knex/knex/issues/2037

Maybe an example to recipes could be added or something.

Sleepful commented 3 years ago

seems like stream doesn't close its connection ever, and then you get a stream that is already depleted when you try to use it again. Very odd.

kibertoad commented 3 years ago

@Sleepful Would you consider sending a PR to knex to address that?

Sleepful commented 3 years ago

Oh would you look at that, it was my fault ... apparently some stream was trying to get re-used after it finished because it wasn't running out of scope ... or similar. Thanks for the quick reply though @kibertoad