Documentation on db types to haskell types convertion#203
Documentation on db types to haskell types convertion#203matsumonkie wants to merge 5 commits intotomjaguarpaw:masterfrom
Conversation
|
Why does one need to derive
Also, what about the other way round? How does Opaleye know how to convert a |
|
Also, I'm not clear how |
|
Also, a link to https://hackage.haskell.org/package/postgresql-simple-0.5.2.1/docs/Database-PostgreSQL-Simple-FromField.html in the documentation might be a good idea. It contains a more detailed example of how to handle parsing failures as well. |
- add link to postgresql-simple - add FieldParser method
I think Postgres handle an enum type internally as an Int but present it as a string. Your enum type should probably as a PGString, not sure though.
Yeah you're right, I have changed the PR. Thanks
I don't know yet, still learning Opaleye :-) |
|
Thanks very much for this. I don't really have time at the moment to handle all the inbound Opaleye requests I'm getting but I will get to this sooner or later! |
First thing first, thanks a lot for this awesome project !
I'm in the process the try to understand the source as I find it really interresting.
As a Haskell beginner, I sometime found a bit hard to use Opaleye. Issue #197 is something I have also ran into. I thought it could be nice to add some documentation on how to handle convertions.
What do you think ?