Skip to content

Commit

Permalink
Added Country Encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
takapi327 committed Dec 30, 2024
1 parent b09745a commit 6620423
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/src/main/scala/ldbc/tests/model/Country.scala
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ object Country:

given Decoder[Continent] = Decoder[String].map(str => Continent.valueOf(str.replace(" ", "_")))

given Encoder[Country] = (
Encoder[String] *: Encoder[String] *: Encoder[Continent] *: Encoder[String] *: Encoder[BigDecimal] *:
Encoder[Option[Short]] *: Encoder[Int] *: Encoder[Option[BigDecimal]] *: Encoder[Option[BigDecimal]] *:
Encoder[Option[BigDecimal]] *: Encoder[String] *: Encoder[String] *: Encoder[Option[String]] *:
Encoder[Option[Int]] *: Encoder[String]
).to[Country]
given Decoder[Country] = (
Decoder[String] *: Decoder[String] *: Decoder[Continent] *: Decoder[String] *: Decoder[BigDecimal] *:
Decoder[Option[Short]] *: Decoder[Int] *: Decoder[Option[BigDecimal]] *: Decoder[Option[BigDecimal]] *:
Expand Down

0 comments on commit 6620423

Please sign in to comment.