diff --git a/core/src/main/scala/zio/jdbc/JdbcDecoder.scala b/core/src/main/scala/zio/jdbc/JdbcDecoder.scala index d1f88e03..3c893469 100644 --- a/core/src/main/scala/zio/jdbc/JdbcDecoder.scala +++ b/core/src/main/scala/zio/jdbc/JdbcDecoder.scala @@ -91,22 +91,22 @@ object JdbcDecoder extends JdbcDecoderLowPriorityImplicits { } } - implicit val intDecoder: JdbcDecoder[Int] = JdbcDecoder(_.getInt) - implicit val longDecoder: JdbcDecoder[Long] = JdbcDecoder(_.getLong) - implicit val doubleDecoder: JdbcDecoder[Double] = JdbcDecoder(_.getDouble) - implicit val stringDecoder: JdbcDecoder[String] = JdbcDecoder(_.getString) - implicit val booleanDecoder: JdbcDecoder[Boolean] = JdbcDecoder(_.getBoolean) - implicit val bigDecimalDecoder: JdbcDecoder[java.math.BigDecimal] = JdbcDecoder(_.getBigDecimal) + implicit val intDecoder: JdbcDecoder[Int] = JdbcDecoder(_.getInt) + implicit val longDecoder: JdbcDecoder[Long] = JdbcDecoder(_.getLong) + implicit val doubleDecoder: JdbcDecoder[Double] = JdbcDecoder(_.getDouble) + implicit val stringDecoder: JdbcDecoder[String] = JdbcDecoder(_.getString) + implicit val booleanDecoder: JdbcDecoder[Boolean] = JdbcDecoder(_.getBoolean) + implicit val bigDecimalDecoder: JdbcDecoder[java.math.BigDecimal] = JdbcDecoder(_.getBigDecimal) implicit val bigDecimalDecoderScala: JdbcDecoder[scala.math.BigDecimal] = bigDecimalDecoder.map(scala.math.BigDecimal.javaBigDecimal2bigDecimal) - implicit val shortDecoder: JdbcDecoder[Short] = JdbcDecoder(_.getShort) - implicit val floatDecoder: JdbcDecoder[Float] = JdbcDecoder(_.getFloat) - implicit val byteDecoder: JdbcDecoder[Byte] = JdbcDecoder(_.getByte) - implicit val byteArrayDecoder: JdbcDecoder[Array[Byte]] = JdbcDecoder(_.getBytes) - implicit val blobDecoder: JdbcDecoder[Blob] = JdbcDecoder(_.getBlob) - implicit val dateDecoder: JdbcDecoder[java.sql.Date] = JdbcDecoder(_.getDate) - implicit val timeDecoder: JdbcDecoder[java.sql.Time] = JdbcDecoder(_.getTime) - implicit val timestampDecoder: JdbcDecoder[java.sql.Timestamp] = JdbcDecoder(_.getTimestamp) + implicit val shortDecoder: JdbcDecoder[Short] = JdbcDecoder(_.getShort) + implicit val floatDecoder: JdbcDecoder[Float] = JdbcDecoder(_.getFloat) + implicit val byteDecoder: JdbcDecoder[Byte] = JdbcDecoder(_.getByte) + implicit val byteArrayDecoder: JdbcDecoder[Array[Byte]] = JdbcDecoder(_.getBytes) + implicit val blobDecoder: JdbcDecoder[Blob] = JdbcDecoder(_.getBlob) + implicit val dateDecoder: JdbcDecoder[java.sql.Date] = JdbcDecoder(_.getDate) + implicit val timeDecoder: JdbcDecoder[java.sql.Time] = JdbcDecoder(_.getTime) + implicit val timestampDecoder: JdbcDecoder[java.sql.Timestamp] = JdbcDecoder(_.getTimestamp) implicit def optionDecoder[A](implicit decoder: JdbcDecoder[A]): JdbcDecoder[Option[A]] = JdbcDecoder(rs =>