Open luksow opened 7 years ago
I think we can automatically generate *
override based on case-class and column structure in the table, if that's what's on your mind. But for this to be complete (eg. no red squiggles in IntelliJ), I believe we should introduce scala-meta based solution. I was thinking of a few cases where we would need scala-meta anyway eg. generation of Free
/ tagless patterns. Stay tuned
That would be fancy but the main thing I want to avoid is ambiguity of the second example. It's not a problem for me to write:
override def * : ProvenShape[Member] = (id, name) ~> ohMightKebsPleaseHelp()
Besides that I guess it's nearly impossible to generate that if you have nested case classes in proven shape.
This does not compile for obvious reasons and needs a change to
(id, name) <> ((Member.apply _).tupled, Member.unapply)
.Even worse, let's consider this:
It won't compile again due to ambiguous reference.
Can kebs help with that?