Implemented using typeclasses.
Implementation:
- Define the problem with types :
Encoder[A]
&Decoder[A]
.Encoder
takes anA
, and produces anAttributeValue
.Decoder
does the opposite.KeyLike[A]
coproduct for things that can be keys.NamedKeyLike[A]
a key that has a name, an encoder, and a decoder.PrimaryKey
- I suppose it's the Primary Key of the table