Closed jnicoulaud-ledger closed 10 months ago
Not sure this is the good way of doing things, if I try the case class example with implicit conversions:
// defining a codec for a refined case class
final case class User(name: Username, age: Int :| Positive)
given Codec[User] = (varchar *: int4).to[User]
Compilation fails with a compiler crash:
java.lang.AssertionError: assertion failed while typechecking /home/jnicoulaud/work/foss/iron/skunk/test/src/io/github/iltotore/iron/SkunkExample.scala
What is the full error thrown by the compiler?
The test module, including this part:
// defining a codec for a refined case class
final case class User(name: Username, age: Int :| Positive)
given Codec[User] = (varchar.refined[Not[Blank]] *: int4.refined[Positive]).to[User]
seems to compile and work as expected. Am I missing something?
EDIT: Nevermind, I found the difference.
Adds support for Skunk.