Skip to content

Commit

Permalink
Merge pull request #989 from jczuchnowski/scala-library-2.13.13
Browse files Browse the repository at this point in the history
Update to Scala 2.13.13
  • Loading branch information
jczuchnowski committed May 6, 2024
2 parents 3029ecf + ee981b8 commit a2a8690
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
java: ['[email protected]', '[email protected]']
scala: ['2.12.18', '2.13.12']
scala: ['2.12.18', '2.13.13']
steps:
- name: Checkout current branch
uses: actions/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions core/jvm/src/main/scala/zio/sql/select/Read.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ sealed trait Read[+Out] { self =>
}

def union[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] =
Read.Union[ResultType, Out1](self, that, true)
Read.Union[ResultType, Out1](self, that, distinct = true)

def unionAll[Out1 >: Out](that: Read.Aux[ResultType, Out1]): Read.Aux[ResultType, Out1] =
Read.Union[ResultType, Out1](self, that, false)
Read.Union[ResultType, Out1](self, that, distinct = false)
}

object Read {
Expand Down
2 changes: 1 addition & 1 deletion jdbc/src/main/scala/zio/sql/JdbcInternalModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ trait JdbcInternalModule { self: Jdbc =>
case TDialectSpecific(t) => t.decode(columnIndex, resultSet)
case t @ Nullable() =>
val _ = nonNull
extractColumn(columnIndex, resultSet, t.typeTag, false).map(Option(_))
extractColumn(columnIndex, resultSet, t.typeTag, nonNull = false).map(Option(_))
case TNone => Right(None)
}
}
Expand Down
6 changes: 3 additions & 3 deletions mysql/src/test/scala/zio/sql/mysql/MysqlModuleSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ object MysqlModuleSpec extends MysqlRunnableSpec {
UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"),
"Jose",
"Wiggins",
false,
verified = false,
LocalDate.parse("1987-03-23")
)
)
Expand Down Expand Up @@ -286,8 +286,8 @@ object MysqlModuleSpec extends MysqlRunnableSpec {
)

val rows = List(
CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", true),
CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", false)
CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", verified = true),
CustomerRow(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", verified = false)
)

val command = insertInto(customers)(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ object OracleSqlModuleSpec extends OracleRunnableSpec with ShopSchema {
test("Can insert rows") {

val rows = List(
Customers.Customers(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", true),
Customers.Customers(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", false)
Customers.Customers(UUID.randomUUID(), LocalDate.ofYearDay(2001, 8), "Peter", "Parker", verified = true),
Customers.Customers(UUID.randomUUID(), LocalDate.ofYearDay(1980, 2), "Stephen", "Strange", verified = false)
)

val command = insertInto(customers)(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ object CustomFunctionDefSpec extends PostgresRunnableSpec with DbSchema {
UUID.fromString("60b01fc9-c902-4468-8d49-3c0f989def37"),
"Ronald",
"Russell",
true,
verified = true,
LocalDate.parse("1983-01-05")
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer1",
"lnameCustomer1",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -46,7 +46,7 @@ object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer2",
"lnameCustomer2",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -55,7 +55,7 @@ object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer3",
"lnameCustomer3",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -64,7 +64,7 @@ object DeleteBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer4",
"lnameCustomer4",
false,
verified = false,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object InsertBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer1",
"lnameCustomer1",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -31,7 +31,7 @@ object InsertBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer2",
"lnameCustomer2",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -40,7 +40,7 @@ object InsertBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer3",
"lnameCustomer3",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -49,7 +49,7 @@ object InsertBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer4",
"lnameCustomer4",
false,
verified = false,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema {
UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"),
"Jose",
"Wiggins",
false,
verified = false,
LocalDate.parse("1987-03-23")
)
)
Expand Down Expand Up @@ -450,7 +450,15 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema {
val created = ZonedDateTime.now()

val data =
CustomerRow(UUID.randomUUID(), "Jaro", "Regec", true, LocalDate.ofYearDay(1990, 1), created.toString, created)
CustomerRow(
UUID.randomUUID(),
"Jaro",
"Regec",
verified = true,
LocalDate.ofYearDay(1990, 1),
created.toString,
created
)

implicit val customerRowSchema =
Schema.CaseClass7[UUID, String, String, Boolean, LocalDate, String, ZonedDateTime, CustomerRow](
Expand Down Expand Up @@ -647,7 +655,6 @@ object PostgresSqlModuleSpec extends PostgresRunnableSpec with DbSchema {
test("in joined tables, columns of the same name from different table are treated as different columns") {
import Cities._
import Ordering._
import Expr._

/**
* SELECT ms.name, c.name, COUNT(ml.id) as line_count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer1",
"lnameCustomer1",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -60,7 +60,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer2",
"lnameCustomer2",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand Down Expand Up @@ -89,7 +89,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer1",
"lnameCustomer1",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -98,7 +98,7 @@ object TransactionSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer2",
"lnameCustomer2",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ object UpdateBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer1",
"lnameCustomer1",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -36,7 +36,7 @@ object UpdateBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer2",
"lnameCustomer2",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -45,7 +45,7 @@ object UpdateBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer3",
"lnameCustomer3",
true,
verified = true,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand All @@ -54,7 +54,7 @@ object UpdateBatchSpec extends PostgresRunnableSpec with DbSchema {
LocalDate.now(),
"fnameCustomer4",
"lnameCustomer4",
false,
verified = false,
LocalDate.now().toString,
ZonedDateTime.now()
)
Expand Down
2 changes: 1 addition & 1 deletion project/BuildHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import scalafix.sbt.ScalafixPlugin.autoImport.scalafixSemanticdb

object BuildHelper {
val Scala212 = "2.12.18"
val Scala213 = "2.13.12"
val Scala213 = "2.13.13"
val ScalaDotty = "3.3.0"

def buildInfoSettings(packageName: String) =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec {
UUID.fromString("636ae137-5b1a-4c8c-b11f-c47c624d9cdc"),
"Jose",
"Wiggins",
false,
verified = false,
LocalDate.parse("1987-03-23")
)
)
Expand Down Expand Up @@ -675,8 +675,8 @@ object SqlServerModuleSpec extends SqlServerRunnableSpec {
test("Can insert rows") {

val rows = List(
CustomerRow(UUID.randomUUID(), "Peter", "Parker", true, LocalDate.ofYearDay(2001, 8)),
CustomerRow(UUID.randomUUID(), "Stephen", "Strange", false, LocalDate.ofYearDay(1980, 2))
CustomerRow(UUID.randomUUID(), "Peter", "Parker", verified = true, LocalDate.ofYearDay(2001, 8)),
CustomerRow(UUID.randomUUID(), "Stephen", "Strange", verified = false, LocalDate.ofYearDay(1980, 2))
)

val command = insertInto(customers)(
Expand Down

0 comments on commit a2a8690

Please sign in to comment.