-
Notifications
You must be signed in to change notification settings - Fork 22
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
Make stream more general #54
base: master
Are you sure you want to change the base?
Conversation
Polite bump... Without this I currently have to maintain a fork to be able to access the internal module. I would really appreciate it if this (or similar functionality) could be provided. |
Is there anything I can do to make this easier for you to accept/think about? |
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.
Disclaimer: I don't maintain this package, I'm just an interested party.
I think this is a good idea! I'm interested in using this in my employer's codebase. We have a home-grown class for deserializing [(Column, Value)]
rows into domain types. Currently we validate the column names for every row in the result set. With this change we could instead validate the column names and count once per result set.
For the sake of backwards compatibility, perhaps we should instead introduce new streaming functions instead of changing the types of the existing ones?
@@ -360,7 +360,7 @@ streamWithParams :: | |||
-> (state -> [(Column, Value)] -> m (Step state)) |
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.
-> (state -> [(Column, Value)] -> m (Step state)) | |
-> (state -> [Value] -> m (Step state)) |
Given that state
is now derived from our columns, does it make sense to remove Column
here?
I agree on introducing new ones with new names. Otherwise the changes sound good. |
Sometimes the setup of the state needs to know the number and potentially names of the columns. What do you think about this change?