-
Notifications
You must be signed in to change notification settings - Fork 39
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
Streaming queries #124
Streaming queries #124
Conversation
For large datasets, often don't want to load the full set at once, this allows fetching and processing rows one at a time
@mcmcgrath13, I'm not sure I understand the reason for this change. I believe we already have this functionality w/ |
@quinnj it's definitely a subtle difference. With From the MySQL documentation:
I am running into an issue where I need to query a large amount of data from one MySQL database (a simple I wanted to get the PR started to start the conversation around how to implement this functionality, but it's not quite ready for merging and I wonder if you think there may be a better solution. |
Stream query
@quinnj I was able to test this on the full scale database and it worked successfully |
@mcmcgrath13, thanks for the explanation, I get the idea now. So here's my thought so we can hopefully avoid the code duplication:
This should allow re-using the existing Does that sound ok? |
@quinnj sounds good! I'll take a pass at these changes tomorrow and let you know when it's ready for review. |
Codecov Report
@@ Coverage Diff @@
## master #124 +/- ##
===========================================
- Coverage 87.07% 52.05% -35.02%
===========================================
Files 5 5
Lines 147 267 +120
===========================================
+ Hits 128 139 +11
- Misses 19 128 +109
Continue to review full report at Codecov.
|
@quinnj I've incorporated your suggestions - could you review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments of things to tweak, but overall this looks great! Thanks @mcmcgrath13!
@quinnj thanks for reviewing! I've incorporated your suggestions and I believe it's ready to go |
Thanks @mcmcgrath13! I'm going to take another stab at updating the binary builder for the package and then do a release. |
Implement new type
StreamingQuery
. This is similar to theQuery
structure, but instead of storing the result, uses the result. Due to this difference, StreamingQuery does not implement the tables interface and the only way to fetch the result is via iteration. This is intended to be used as a lower level function for those who need to work with large queries that can't fit in memory.Still to do: