-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from SwissBorg/use-diff-slick-version-for-scala3
Use Slick 3.4.x for Scala 2 and Slick 3.5.x for Scala 3.
- Loading branch information
Showing
5 changed files
with
155 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...rc/main/scala-2.13/org/apache/pekko/persistence/postgres/db/ExtendedPostgresProfile.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package org.apache.pekko.persistence.postgres.db | ||
|
||
import com.github.tminglei.slickpg.* | ||
import slick.basic.Capability | ||
import slick.jdbc.JdbcCapabilities | ||
|
||
trait ExtendedPostgresProfile | ||
extends ExPostgresProfile | ||
with PgArraySupport | ||
with PgDate2Support | ||
with PgRangeSupport | ||
with PgHStoreSupport | ||
with PgSearchSupport | ||
with PgNetSupport | ||
with PgJsonSupport | ||
with PgLTreeSupport | ||
with array.PgArrayJdbcTypes | ||
with PgCirceJsonSupport { | ||
|
||
def pgjson = "jsonb" // jsonb support is in postgres 9.4.0 onward; for 9.3.x use "json" | ||
|
||
// Add back `capabilities.insertOrUpdate` to enable native `upsert` support; for postgres 9.5+ | ||
override protected def computeCapabilities: Set[Capability] = | ||
super.computeCapabilities + JdbcCapabilities.insertOrUpdate | ||
|
||
override val api: MyAPI.type = MyAPI | ||
|
||
trait MyAPI | ||
extends API | ||
with ArrayImplicits | ||
with SimpleArrayPlainImplicits | ||
with DateTimeImplicits | ||
with NetImplicits | ||
with LTreeImplicits | ||
with RangeImplicits | ||
with HStoreImplicits | ||
with SearchImplicits | ||
with SearchAssistants | ||
with JsonImplicits { | ||
implicit val strListTypeMapper: DriverJdbcType[List[String]] = new SimpleArrayJdbcType[String]("text").to(_.toList) | ||
} | ||
object MyAPI extends MyAPI | ||
} | ||
|
||
object ExtendedPostgresProfile extends ExtendedPostgresProfile |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters