diff --git a/build.sbt b/build.sbt index 197bec61..c3987e47 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ inThisBuild { - val scala212 = "2.12.19" - val scala213 = "2.13.14" - val scala3 = "3.3.3" + val scala212 = "2.12.20" + val scala213 = "2.13.15" + val scala3 = "3.3.4" List( scalaVersion := scala213, diff --git a/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/RowDecoderMagnoliaDerivation.scala b/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/RowDecoderMagnoliaDerivation.scala index 53a5524c..b95f0729 100644 --- a/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/RowDecoderMagnoliaDerivation.scala +++ b/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/RowDecoderMagnoliaDerivation.scala @@ -1,10 +1,11 @@ package io.kaizensolutions.virgil.codecs -import scala.deriving.Mirror import com.datastax.oss.driver.api.core.cql.Row import io.kaizensolutions.virgil.annotations.CqlColumn import magnolia1.* +import scala.deriving.Mirror + // Note: Fully automatic derivation is not yet present in Scala 3 just yet (because I haven't figured out how to do it yet) trait RowDecoderMagnoliaDerivation extends ProductDerivation[CqlRowDecoder]: final def join[T](ctx: CaseClass[Typeclass, T]): CqlRowDecoder.Object[T] = (row: Row) => diff --git a/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/UdtValueDecoderMagnoliaDerivation.scala b/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/UdtValueDecoderMagnoliaDerivation.scala index 3ec7c21c..2b636dcf 100644 --- a/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/UdtValueDecoderMagnoliaDerivation.scala +++ b/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/UdtValueDecoderMagnoliaDerivation.scala @@ -1,10 +1,11 @@ package io.kaizensolutions.virgil.codecs -import scala.deriving.Mirror import com.datastax.oss.driver.api.core.data.UdtValue import io.kaizensolutions.virgil.annotations.CqlColumn import magnolia1.* +import scala.deriving.Mirror + // Note: Fully automatic derivation is not yet present in Scala 3 just yet (because I haven't figured out how to do it yet) trait UdtValueDecoderMagnoliaDerivation extends ProductDerivation[CqlUdtValueDecoder]: final def join[T](ctx: CaseClass[Typeclass, T]): CqlUdtValueDecoder.Object[T] = diff --git a/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/UdtValueEncoderMagnoliaDerivation.scala b/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/UdtValueEncoderMagnoliaDerivation.scala index e70db06c..73d213fa 100644 --- a/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/UdtValueEncoderMagnoliaDerivation.scala +++ b/core/src/main/scala-3/io.kaizensolutions.virgil.codecs/UdtValueEncoderMagnoliaDerivation.scala @@ -1,9 +1,10 @@ package io.kaizensolutions.virgil.codecs -import scala.deriving.Mirror import com.datastax.oss.driver.api.core.data.UdtValue import io.kaizensolutions.virgil.annotations.CqlColumn -import magnolia1._ +import magnolia1.* + +import scala.deriving.Mirror // Note: Fully automatic derivation is not yet present in Scala 3 just yet (because I haven't figured out how to do it yet) trait UdtValueEncoderMagnoliaDerivation extends ProductDerivation[CqlUdtValueEncoder]: diff --git a/core/src/main/scala/io/kaizensolutions/virgil/codecs/CqlPrimitiveEncoder.scala b/core/src/main/scala/io/kaizensolutions/virgil/codecs/CqlPrimitiveEncoder.scala index cf4b1a7e..2c37d607 100644 --- a/core/src/main/scala/io/kaizensolutions/virgil/codecs/CqlPrimitiveEncoder.scala +++ b/core/src/main/scala/io/kaizensolutions/virgil/codecs/CqlPrimitiveEncoder.scala @@ -2,7 +2,8 @@ package io.kaizensolutions.virgil.codecs import com.datastax.oss.driver.api.core.`type`._ import com.datastax.oss.driver.api.core.data.CqlDuration -import com.datastax.oss.driver.api.core.data.{SettableByIndex, SettableByName} +import com.datastax.oss.driver.api.core.data.SettableByIndex +import com.datastax.oss.driver.api.core.data.SettableByName import com.datastax.oss.driver.api.core.data.UdtValue import scala.jdk.CollectionConverters._ diff --git a/core/src/test/scala-3/io/kaizensolutions/virgil/models/CursorUdtAddressInstances.scala b/core/src/test/scala-3/io/kaizensolutions/virgil/models/CursorUdtAddressInstances.scala index 160344aa..c2567a1b 100644 --- a/core/src/test/scala-3/io/kaizensolutions/virgil/models/CursorUdtAddressInstances.scala +++ b/core/src/test/scala-3/io/kaizensolutions/virgil/models/CursorUdtAddressInstances.scala @@ -1,6 +1,7 @@ package io.kaizensolutions.virgil.models -import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder} +import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder +import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder import io.kaizensolutions.virgil.models.CursorSpecDatatypes.CursorUdtAddress trait CursorUdtAddressInstances: diff --git a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_AddressInstances.scala b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_AddressInstances.scala index ed8d90b3..124ce923 100644 --- a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_AddressInstances.scala +++ b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_AddressInstances.scala @@ -1,6 +1,7 @@ package io.kaizensolutions.virgil.models -import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder} +import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder +import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_Address trait UDT_AddressInstances { diff --git a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_DataInstances.scala b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_DataInstances.scala index 128691fd..80e5a7c5 100644 --- a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_DataInstances.scala +++ b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_DataInstances.scala @@ -1,6 +1,7 @@ package io.kaizensolutions.virgil.models -import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder} +import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder +import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_Data trait UDT_DataInstances: diff --git a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_EmailInstances.scala b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_EmailInstances.scala index 4636f141..10842f28 100644 --- a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_EmailInstances.scala +++ b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_EmailInstances.scala @@ -1,6 +1,7 @@ package io.kaizensolutions.virgil.models -import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder} +import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder +import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_Email trait UDT_EmailInstances: diff --git a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleCollectionNestedUDTTypeInstances.scala b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleCollectionNestedUDTTypeInstances.scala index 279746f2..8c67feff 100644 --- a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleCollectionNestedUDTTypeInstances.scala +++ b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleCollectionNestedUDTTypeInstances.scala @@ -1,6 +1,7 @@ package io.kaizensolutions.virgil.models -import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder} +import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder +import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_ExampleCollectionNestedUDTType trait UDT_ExampleCollectionNestedUDTTypeInstances: diff --git a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleNestedTypeInstances.scala b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleNestedTypeInstances.scala index 00817946..0c523380 100644 --- a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleNestedTypeInstances.scala +++ b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleNestedTypeInstances.scala @@ -1,6 +1,7 @@ package io.kaizensolutions.virgil.models -import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder} +import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder +import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_ExampleNestedType trait UDT_ExampleNestedTypeInstances: diff --git a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleTypeInstances.scala b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleTypeInstances.scala index 34348c09..6e5b86ba 100644 --- a/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleTypeInstances.scala +++ b/core/src/test/scala-3/io/kaizensolutions/virgil/models/UDT_ExampleTypeInstances.scala @@ -1,6 +1,7 @@ package io.kaizensolutions.virgil.models -import io.kaizensolutions.virgil.codecs.{CqlUdtValueDecoder, CqlUdtValueEncoder} +import io.kaizensolutions.virgil.codecs.CqlUdtValueDecoder +import io.kaizensolutions.virgil.codecs.CqlUdtValueEncoder import io.kaizensolutions.virgil.models.UserDefinedTypesSpecDatatypes.UDT_ExampleType trait UDT_ExampleTypeInstances: diff --git a/core/src/test/scala/io/kaizensolutions/virgil/models/MusicLibraryItem.scala b/core/src/test/scala/io/kaizensolutions/virgil/models/MusicLibraryItem.scala index 3fb274d4..dd375688 100644 --- a/core/src/test/scala/io/kaizensolutions/virgil/models/MusicLibraryItem.scala +++ b/core/src/test/scala/io/kaizensolutions/virgil/models/MusicLibraryItem.scala @@ -1,6 +1,7 @@ package io.kaizensolutions.virgil.models import io.kaizensolutions.virgil.annotations.CqlColumn + import java.time.LocalDate final case class MusicLibraryItem( diff --git a/project/plugins.sbt b/project/plugins.sbt index a76742aa..9da8de10 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0") addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.1") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.14") addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") diff --git a/zio/src/main/scala/io/kaizensolutions/virgil/internal/CQLExecutorImpl.scala b/zio/src/main/scala/io/kaizensolutions/virgil/internal/CQLExecutorImpl.scala index 191fb62c..5078c8e7 100644 --- a/zio/src/main/scala/io/kaizensolutions/virgil/internal/CQLExecutorImpl.scala +++ b/zio/src/main/scala/io/kaizensolutions/virgil/internal/CQLExecutorImpl.scala @@ -3,7 +3,6 @@ package io.kaizensolutions.virgil.internal import com.datastax.oss.driver.api.core.CqlSession import com.datastax.oss.driver.api.core.cql.{BatchType => _, _} import com.datastax.oss.driver.api.core.metrics.Metrics -import io.kaizensolutions.virgil.Paged import io.kaizensolutions.virgil._ import io.kaizensolutions.virgil.configuration.ExecutionAttributes import io.kaizensolutions.virgil.configuration.PageState diff --git a/zio/src/test/scala/io/kaizensolutions/virgil/CQLExecutorSpec.scala b/zio/src/test/scala/io/kaizensolutions/virgil/CQLExecutorSpec.scala index 06b5d61d..5b0660c1 100644 --- a/zio/src/test/scala/io/kaizensolutions/virgil/CQLExecutorSpec.scala +++ b/zio/src/test/scala/io/kaizensolutions/virgil/CQLExecutorSpec.scala @@ -1,6 +1,7 @@ package io.kaizensolutions.virgil -import com.datastax.oss.driver.api.core.{CqlSession, CqlSessionBuilder} +import com.datastax.oss.driver.api.core.CqlSession +import com.datastax.oss.driver.api.core.CqlSessionBuilder import io.kaizensolutions.virgil.configuration.ConsistencyLevel import io.kaizensolutions.virgil.configuration.ExecutionAttributes import io.kaizensolutions.virgil.cql._ diff --git a/zio/src/test/scala/io/kaizensolutions/virgil/SelectBuilderSpec.scala b/zio/src/test/scala/io/kaizensolutions/virgil/SelectBuilderSpec.scala index dc59ddfb..c193c812 100644 --- a/zio/src/test/scala/io/kaizensolutions/virgil/SelectBuilderSpec.scala +++ b/zio/src/test/scala/io/kaizensolutions/virgil/SelectBuilderSpec.scala @@ -1,13 +1,13 @@ package io.kaizensolutions.virgil -import io.kaizensolutions.virgil.models.MusicLibraryItem +import com.datastax.oss.driver.api.core.cql.Row +import io.kaizensolutions.virgil.codecs.CqlRowDecoder import io.kaizensolutions.virgil.cql._ import io.kaizensolutions.virgil.dsl._ +import io.kaizensolutions.virgil.models.MusicLibraryItem +import zio.Chunk +import zio.RIO import zio.test._ -import io.kaizensolutions.virgil.dsl.SelectBuilder -import com.datastax.oss.driver.api.core.cql.Row -import io.kaizensolutions.virgil.codecs.CqlRowDecoder -import zio.{Chunk, RIO} object SelectBuilderSpec { def selectBuilderSpec =