Skip to content

Commit

Permalink
jump to v0.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tminglei committed Mar 12, 2024
1 parent 50637e7 commit f883e85
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 54 deletions.
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Slick-pg
- Pg_trgm


** _Tested on `PostgreSQL 11/12/13/14` with `Slick 3.5.0-M4`._
** _`Java 8`+ is required._
** _Tested on `PostgreSQL 11/12/13/14` with `Slick 3.5.0`._
** _`Java 11`+ is required._



Expand Down Expand Up @@ -153,24 +153,24 @@ Here's the related technical details:
| List[T] | ARRAY | no 3rd party dependencies |
| `java.sql` Date <br> Time<br> Timestamp<br> slickpg Interval<br> Calendar | date<br> time<br> timestamp<br> interval<br> timestamptz | no 3rd party dependencies |
| `java.time` LocalDate<br> LocalTime<br> LocalDateTime<br> Duration<br> ZonedDateTime <br> OffsetDateTime | date<br> time<br> timestamp<br> interval<br> timestamptz <br> timestamptz | (built-in) no 3rd party dependencies |
| `joda` LocalDate<br> LocalTime<br> LocalDateTime<br> Period<br> DateTime | date<br> time<br> timestamp<br> interval<br> timestamptz | `joda-time` v2.10.5 |
| `joda` LocalDate<br> LocalTime<br> LocalDateTime<br> Period<br> DateTime | date<br> time<br> timestamp<br> interval<br> timestamptz | `joda-time` v2.12.7 |
| `scala` Enumeration | enum | no 3rd party dependencies |
| `slickpg` Range[T] | range | no 3rd party dependencies |
| `slickpg` LTree | ltree | no 3rd party dependencies |
| Map[String,String] | hstore | no 3rd party dependencies |
| `slickpg` InetString | inet | no 3rd party dependencies |
| `slickpg` MacAddrString | macaddr | no 3rd party dependencies |
| `slickpg` JsonString | json | no 3rd party dependencies |
| `json4s` JValue | json | `json4s` v3.6.6 |
| `json4s` JValue | json | `json4s` v4.0.7 |
| `play-json` JsValue | json | `play-json` v2.10 or v3.0 |
| `spray-json` JsValue | json | `spray-json` v1.3.5 |
| `argonaut json` Json | json | `argonaut` v6.2.3 |
| `circe json` Json | json | `circe` v0.11.2 / v0.12.3 |
| `uPickle json` Json | json | `uPickle` v2.0.0 |
| `jawn json` Json | json | `jawn` v0.14.2 |
| `argonaut json` Json | json | `argonaut` v6.3.9 |
| `circe json` Json | json | `circe` v0.14.6 |
| `uPickle json` Json | json | `uPickle` v3.1.4 |
| `jawn json` Json | json | `jawn` v1.5.1 |
| (TsQuery+TsVector) | `text` search | no 3rd party dependencies |
| `jts` Geometry | `postgis` geometry | `jts` v1.14.0 |
| `locationtech's jts` Geometry | `postgis` geometry | locationtech's `jts` v1.16.1 |
| `locationtech's jts` Geometry | `postgis` geometry | locationtech's `jts` v1.19.0 |

_**Warning:** When your work with time data that contain Timezone, be wary of your postgres configuration. By default `ZonedDateTime` in Java 8 contains more information than `timestamptz` in Postgres. As a consequence, when you store a `ZonedDateTime` you are not guaranteed to get the same timezone as the original class instance. Prefer `OffsetDateTime` instead. cf [Issue #248](https://github.com/tminglei/slick-pg/issues/248)_

Expand All @@ -197,51 +197,51 @@ Install
-------
To use `slick-pg` in [sbt](http://www.scala-sbt.org/ "slick-sbt") project, add the following to your project file:
```scala
libraryDependencies += "com.github.tminglei" %% "slick-pg" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg" % "0.22.0"
```

> If you need `joda-time` support, pls append dependency:
```scala
libraryDependencies += "com.github.tminglei" %% "slick-pg_joda-time" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_joda-time" % "0.22.0"
```

> If you need `jts` geom support, pls append dependency:
```scala
libraryDependencies += "com.github.tminglei" %% "slick-pg_jts" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_jts" % "0.22.0"
or
libraryDependencies += "com.github.tminglei" %% "slick-pg_jts_lt" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_jts_lt" % "0.22.0"
```

> If you need `json4s` support, pls append dependency:
```scala
libraryDependencies += "com.github.tminglei" %% "slick-pg_json4s" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_json4s" % "0.22.0"
```

> If you need `play-json` support, pls append dependency:
```scala
libraryDependencies += "com.github.tminglei" %% "slick-pg_play-json" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_play-json" % "0.22.0"
or
libraryDependencies += "com.github.tminglei" %% "slick-pg_play-json3" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_play-json3" % "0.22.0"
```

> If you need `spray-json` support, pls append dependency:
```scala
libraryDependencies += "com.github.tminglei" %% "slick-pg_spray-json" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_spray-json" % "0.22.0"
```

> If you need `argonaut json` support, pls append dependency:
```scala
libraryDependencies += "com.github.tminglei" %% "slick-pg_argonaut" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_argonaut" % "0.22.0"
```

> If you need `circe json` support, pls append dependency:
```scala
libraryDependencies += "com.github.tminglei" %% "slick-pg_circe-json" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_circe-json" % "0.22.0"
```

> If you need `uPickle json` support, pls append dependency:
```scala
libraryDependencies += "com.github.tminglei" %% "slick-pg_upickle-json" % "0.22.0-M4"
libraryDependencies += "com.github.tminglei" %% "slick-pg_upickle-json" % "0.22.0"
```


Expand All @@ -250,7 +250,7 @@ Or, in [maven](http://maven.apache.org/ "maven") project, you can add `slick-pg`
<dependency>
<groupId>com.github.tminglei</groupId>
<artifactId>slick-pg_2.13</artifactId>
<version>0.22.0-M4</version>
<version>0.22.0</version>
</dependency>
<!-- other addons if necessary -->
...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class PgPlayJsonSupportSuite extends AnyFunSuite with PostgresContainer {
val testRec3 = JsonBean(37L, Json.parse(""" { "field": "PF/00.0.0 (abc.xyz abc os x.x.x)" } """), List(Json.parse(""" { "field": "PF/00.0.0 (abc.xyz abc os x.x.x)" } """)), JBean("tx", 7), Nil)


test("Play json Lifted support") {
test("play-json Lifted support") {
val json1 = Json.parse(JsonUtils.clean(" {\"b\":2,\"title\":\"hello\\nworld\\\\u00006\u00007\"} "))
val json2 = Json.parse(""" {"a":"v5","b":3} """)

Expand Down Expand Up @@ -208,7 +208,7 @@ class PgPlayJsonSupportSuite extends AnyFunSuite with PostgresContainer {

case class JsonBean1(id: Long, json: JsValue)

test("Json Plain SQL support") {
test("play-json Plain SQL support") {
import MyPostgresProfile.plainAPI._

implicit val getJsonBeanResult: GetResult[JsonBean1] = GetResult(r => JsonBean1(r.nextLong(), r.nextJson()))
Expand Down
63 changes: 32 additions & 31 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ lazy val commonSettings = Seq(
organizationName := "slick-pg",
organization := "com.github.tminglei",
name := "slick-pg",
version := "0.22.0-M5",
version := "0.22.0",

scalaVersion := scala213,
crossScalaVersions := Seq(scala212, scala213, scala3),
Expand Down Expand Up @@ -41,24 +41,24 @@ lazy val commonSettings = Seq(

pomExtra :=
<url>https://github.com/tminglei/slick-pg</url>
<licenses>
<license>
<name>BSD-style</name>
<url>http://www.opensource.org/licenses/bsd-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>git@github.com:tminglei/slick-pg.git</url>
<connection>scm:git:git@github.com:tminglei/slick-pg.git</connection>
</scm>
<developers>
<developer>
<id>tminglei</id>
<name>Minglei Tu</name>
<timezone>+8</timezone>
</developer>
</developers>
<licenses>
<license>
<name>BSD-style</name>
<url>http://www.opensource.org/licenses/bsd-license.php</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>git@github.com:tminglei/slick-pg.git</url>
<connection>scm:git:git@github.com:tminglei/slick-pg.git</connection>
</scm>
<developers>
<developer>
<id>tminglei</id>
<name>Minglei Tu</name>
<timezone>+8</timezone>
</developer>
</developers>

)

Expand Down Expand Up @@ -92,7 +92,7 @@ lazy val slickPg = (project in file("."))
libraryDependencies := mainDependencies(scalaVersion.value)
)
.dependsOn (slickPgCore % "test->test;compile->compile")
.aggregate (slickPgCore, slickPgJoda, slickPgJson4s, slickPgJts, slickPgJtsLt, slickPgPlayJson, slickPgPlayJson3, slickPgSprayJson, slickPgCirceJson, slickPgArgonaut, slickPgJawn)
.aggregate (slickPgCore, slickPgJoda, slickPgJson4s, slickPgJts, slickPgJtsLt, slickPgPlayJson, slickPgSprayJson, slickPgCirceJson, slickPgArgonaut, slickPgJawn)

lazy val slickPgJoda = (project in file("./addons/joda-time"))
.settings(commonSettings)
Expand All @@ -111,9 +111,9 @@ lazy val slickPgJson4s = (project in file("./addons/json4s"))
name := "slick-pg_json4s",
description := "Slick extensions for PostgreSQL - json4s module",
libraryDependencies := mainDependencies(scalaVersion.value) ++ Seq(
"org.json4s" %% "json4s-ast" % "4.0.6",
"org.json4s" %% "json4s-core" % "4.0.6",
"org.json4s" %% "json4s-native" % "4.0.6" % "test"
"org.json4s" %% "json4s-ast" % "4.0.7",
"org.json4s" %% "json4s-core" % "4.0.7",
"org.json4s" %% "json4s-native" % "4.0.7" % "test"
)
)
.dependsOn (slickPgCore % "test->test;compile->compile")
Expand All @@ -140,19 +140,20 @@ lazy val slickPgJtsLt = (project in file("./addons/jts_lt"))
)
.dependsOn (slickPgCore % "test->test;compile->compile")

def slickPgPlayJson0(play: ModuleID, suffix: String) = Project("slick-pg_play-json" + suffix, file("./addons/play-json"))
def playJsonDependencies(scalaVersion: String) = {
if (scalaVersion.startsWith("3")) Seq("org.playframework" %% "play-json" % "3.0.2")
else Seq("com.typesafe.play" %% "play-json" % "2.10.4")
}
lazy val slickPgPlayJson = (project in file("./addons/play-json"))
.settings(commonSettings)
.settings(
description := s"Slick extensions for PostgreSQL - play-json${suffix} module",
target := target.value / suffix,
name := "slick-pg_play-json",
description := "Slick extensions for PostgreSQL - play-json module",
libraryDependencies := mainDependencies(scalaVersion.value) ++
Seq(play)
playJsonDependencies(scalaVersion.value)
)
.dependsOn (slickPgCore % "test->test;compile->compile")

lazy val slickPgPlayJson = slickPgPlayJson0("com.typesafe.play" %% "play-json" % "2.10.3", "")
lazy val slickPgPlayJson3 = slickPgPlayJson0("org.playframework" %% "play-json" % "3.0.2", "3")

lazy val slickPgSprayJson = (project in file("./addons/spray-json"))
.settings(commonSettings)
.settings(
Expand Down Expand Up @@ -184,7 +185,7 @@ lazy val slickPgUPickleJson = (project in file("./addons/upickle-json"))
name := "slick-pg_upickle-json",
description := "Slick extensions for PostgreSQL - uPickle module",
libraryDependencies := mainDependencies(scalaVersion.value) ++
Seq("com.lihaoyi" %% "ujson" % "2.0.0")
Seq("com.lihaoyi" %% "ujson" % "3.1.4")
)
.dependsOn(slickPgCore % "test->test;compile->compile")

Expand Down

0 comments on commit f883e85

Please sign in to comment.