Skip to content

Commit

Permalink
Added Country Decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
takapi327 committed Dec 30, 2024
1 parent 3dee0d2 commit b09745a
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 Decoder[Country] = (
Decoder[String] *: Decoder[String] *: Decoder[Continent] *: Decoder[String] *: Decoder[BigDecimal] *:
Decoder[Option[Short]] *: Decoder[Int] *: Decoder[Option[BigDecimal]] *: Decoder[Option[BigDecimal]] *:
Decoder[Option[BigDecimal]] *: Decoder[String] *: Decoder[String] *: Decoder[Option[String]] *:
Decoder[Option[Int]] *: Decoder[String]
).to[Country]
given Table[Country] = Table.derived[Country]("country")

class CountryTable extends SchemaTable[Country]("country"):
Expand Down

0 comments on commit b09745a

Please sign in to comment.