You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my current software uses large tables, and therefore FromRow instances are getting a bit hard to manage, with all these "field" that I must count.
I think it would be clearer if we had a "fieldNamed :: FromField a => String -> RowParser a" combinator, allowing me to match column by name rather than by its position in a request.
What do you think about that ?
Cheers,
The text was updated successfully, but these errors were encountered:
Hi @paul-r-ml, sorry for taking so long to reply, I was on holiday w/o access to a desktop machine.
I'm not sure this is something I'd like to add. I understand that this becomes tedious with a large number of result fields.. But fieldNamed feels like moving a part of the tuple selector from the SELECT a,b,c clause into the RowParser. A naive implementation (looking up a field based on the column name on each row result set) would also be pretty slow, and a faster implementation would mean rewriting a bunch of the field parser code.
Hi Nurpax,
my current software uses large tables, and therefore FromRow instances are getting a bit hard to manage, with all these "field" that I must count.
I think it would be clearer if we had a "fieldNamed :: FromField a => String -> RowParser a" combinator, allowing me to match column by name rather than by its position in a request.
What do you think about that ?
Cheers,
The text was updated successfully, but these errors were encountered: