Skip to content

Improve stream interface compatibility by adding pause/resume - #775

Merged
dhensby merged 2 commits into
tediousjs:masterfrom
dhensby:pulls/streams
Jan 4, 2019
Merged

dhensby merged 2 commits into
tediousjs:masterfrom
dhensby:pulls/streams

Conversation

@dhensby

@dhensby dhensby commented Jan 3, 2019 •

Copy link
Copy Markdown
Collaborator

What this does:

  • Adds pause/resume methods to request objects

How:

  • Store the current tedious request object by reference
  • pass through the pause / resume calls

Related:

Issues:

  • SQL Server v8 driver doesn't appear to expose resume / pause functionality.

@dhensby
dhensby requested a review from willmorgan January 3, 2019 15:29
@dhensby

dhensby commented Jan 3, 2019

Copy link
Copy Markdown
Collaborator Author

Testing locally pausing and resuming works as expected 🎉

@dhensby

dhensby commented Jan 3, 2019

Copy link
Copy Markdown
Collaborator Author

Right, having looked into "true node streams" I don't think the effort is fully justified right now and especially without an RFC and some major changes to this lib. Possibly in v6 or v5 if we can justify pushing the alpha phase for a long while...

For now I'm going to look into writing a test for this, but I'm not sure how valuable that is as we are 100% dependant on tedious adhering to the pause/resume contract.

@willmorgan willmorgan added this to the 5.0 milestone Jan 3, 2019
@dhensby

dhensby commented Jan 4, 2019

Copy link
Copy Markdown
Collaborator Author

Right, I'm going to be rude and merge this without tests because this is purely a passthrough to tedious and any integration test would be silly and I can't see a nice way to unit test this right now... :(

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

Successfully merging this pull request may close these issues.

2 participants