Reputation: 5875
This is a common pattern when using slick SQL
implicit private val mapper = GetResult[MyClass]{r =>
MyClass(r.<<, r.<<, r.<<, r.<<, r.<<?, r.<<?, r.<<?, r.<<)
}
Is there a way to write something much cleaner, without the boilerplate? e.g.
implicit private val mapper = GetResult[MyClass]
when MyClass
is a case class.
Upvotes: 4
Views: 745
Reputation: 5875
There seems to be an overwhelming tendency for people to answer in comments on SO these days (afraid of downvotes?). In conclusion, no there is no shortcut.
UPDATE: today we would use https://skillsmatter.com/skillscasts/6875-workshop-shapeless-for-mortals
Upvotes: 6