Replies: 1 comment
-
Here's my take. SQL schemas and queries evolve differently over time. Thus, Skunk chooses an explicit encoding of This allows you to evolve independently of typeclass instances, without resorting to orphan instances. Now, in this case, you could choose to re-use the If the Anyway, re-using those codecs is still a valid choice, but usually one you need to make with other team members. That's up to you, but in this project, I think it's better to leave things as they are to reflect the ideas the book tries to convey. |
Beta Was this translation helpful? Give feedback.
-
Currently schemas that require a
Join
query are defined similar to the following:I would like to argue that this doesn't scale well and isn't very pretty (at least at scale). Given that we already have
Codecs
forBrand
andCategory
so I think thisDecoder
should be defined in terms of composition (which as functional idea is also worth iterating once again here).This would require the
SQL
objects to be at leastpackage private
Opening the issue for discussion but happy to make a PR if people are open to it
Beta Was this translation helpful? Give feedback.
All reactions