From 92dadcfcc8dd66992d74daf2edd1bea6df3111ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Raddum=20Berg?= Date: Thu, 9 Nov 2023 22:18:30 +0100 Subject: [PATCH] zio-jdbc extensions were upstreamed --- .../src/scala/typo/dsl/SelectBuilderSql.scala | 1 - .../src/scala/typo/dsl/SelectParams.scala | 1 - .../src/scala/typo/dsl/SortOrder.scala | 1 - .../src/scala/typo/dsl/UpdateBuilder.scala | 1 - .../src/scala/typo/dsl/extensions.scala | 21 ------------------- 5 files changed, 25 deletions(-) delete mode 100644 typo-dsl-zio-jdbc/src/scala/typo/dsl/extensions.scala diff --git a/typo-dsl-zio-jdbc/src/scala/typo/dsl/SelectBuilderSql.scala b/typo-dsl-zio-jdbc/src/scala/typo/dsl/SelectBuilderSql.scala index c29f254e8e..374cc72665 100644 --- a/typo-dsl-zio-jdbc/src/scala/typo/dsl/SelectBuilderSql.scala +++ b/typo-dsl-zio-jdbc/src/scala/typo/dsl/SelectBuilderSql.scala @@ -1,7 +1,6 @@ package typo.dsl import zio.jdbc.* -import extensions.* import zio.{Chunk, NonEmptyChunk, ZIO} import java.util.concurrent.atomic.AtomicInteger diff --git a/typo-dsl-zio-jdbc/src/scala/typo/dsl/SelectParams.scala b/typo-dsl-zio-jdbc/src/scala/typo/dsl/SelectParams.scala index e4acbd45fd..1006a8caec 100644 --- a/typo-dsl-zio-jdbc/src/scala/typo/dsl/SelectParams.scala +++ b/typo-dsl-zio-jdbc/src/scala/typo/dsl/SelectParams.scala @@ -1,6 +1,5 @@ package typo.dsl -import typo.dsl.extensions.NonEmptyChunkOps import zio.jdbc.* import zio.{Chunk, NonEmptyChunk} diff --git a/typo-dsl-zio-jdbc/src/scala/typo/dsl/SortOrder.scala b/typo-dsl-zio-jdbc/src/scala/typo/dsl/SortOrder.scala index 4138e4dac2..c256e9a47f 100644 --- a/typo-dsl-zio-jdbc/src/scala/typo/dsl/SortOrder.scala +++ b/typo-dsl-zio-jdbc/src/scala/typo/dsl/SortOrder.scala @@ -2,7 +2,6 @@ package typo.dsl import zio.Chunk import zio.jdbc.* -import extensions.FragmentOps import java.util.concurrent.atomic.AtomicInteger // sort by a field diff --git a/typo-dsl-zio-jdbc/src/scala/typo/dsl/UpdateBuilder.scala b/typo-dsl-zio-jdbc/src/scala/typo/dsl/UpdateBuilder.scala index 81d87d8fa0..1fc5b74da7 100644 --- a/typo-dsl-zio-jdbc/src/scala/typo/dsl/UpdateBuilder.scala +++ b/typo-dsl-zio-jdbc/src/scala/typo/dsl/UpdateBuilder.scala @@ -1,6 +1,5 @@ package typo.dsl -import typo.dsl.extensions.* import zio.jdbc.* import zio.{Chunk, NonEmptyChunk, ZIO} diff --git a/typo-dsl-zio-jdbc/src/scala/typo/dsl/extensions.scala b/typo-dsl-zio-jdbc/src/scala/typo/dsl/extensions.scala deleted file mode 100644 index 6ab0e9b793..0000000000 --- a/typo-dsl-zio-jdbc/src/scala/typo/dsl/extensions.scala +++ /dev/null @@ -1,21 +0,0 @@ -package typo.dsl - -import zio.NonEmptyChunk -import zio.jdbc.SqlFragment - -object extensions { - implicit final class FragmentOps[I[t] <: Iterable[t]](private val fragments: I[SqlFragment]) extends AnyVal { - def mkFragment(sep: SqlFragment): SqlFragment = - SqlFragment.intersperse(sep, fragments) - - def mkFragment(start: SqlFragment, sep: SqlFragment, end: SqlFragment): SqlFragment = - start ++ SqlFragment.intersperse(sep, fragments) ++ end - } - - implicit final class NonEmptyChunkOps(private val fragments: NonEmptyChunk[SqlFragment]) extends AnyVal { - def mkFragment(sep: SqlFragment): SqlFragment = - fragments.toChunk.mkFragment(sep) - def mkFragment(start: SqlFragment, sep: SqlFragment, end: SqlFragment): SqlFragment = - fragments.toChunk.mkFragment(start, sep, end) - } -}