Skip to content

Commit

Permalink
Merge pull request #634 from slick/slick-3.5.0-M3
Browse files Browse the repository at this point in the history
Slick 3.5.0-M3
  • Loading branch information
tminglei authored Apr 26, 2023
2 parents 40eb12e + ee0740d commit 51d764b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 55 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def mainDependencies(scalaVersion: String) = {
}
Seq (
"org.scala-lang" % "scala-reflect" % scalaVersion,
"com.typesafe.slick" %% "slick" % "3.5.0-M2",
"com.typesafe.slick" %% "slick" % "3.5.0-M3",
"org.postgresql" % "postgresql" % "42.6.0",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.9.0",
"org.slf4j" % "slf4j-simple" % "2.0.7" % "provided",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ trait ExPostgresProfile extends JdbcProfile with PostgresProfile with Logging {
*************************************************************************/

class ExtPostgresQueryBuilder(tree: Node, state: CompilerState) extends PostgresQueryBuilder(tree, state) {
import slick.util.MacroSupport.macroSupportInterpolation
override def expr(n: Node, skipParens: Boolean = false) = n match {
import slick.util.QueryInterpolator.queryInterpolator
override def expr(n: Node): Unit = n match {
case agg.AggFuncExpr(func, params, orderBy, filter, distinct, forOrdered) =>
if (func == Library.CountAll) b"${func.name}"
else {
b"${func.name}("
if (distinct) b"distinct "
b.sep(params, ",")(expr(_, true))
b.sep(params, ",")(expr(_, skipParens = true))
if (orderBy.nonEmpty && !forOrdered) buildOrderByClause(orderBy)
b")"
}
Expand All @@ -94,14 +94,14 @@ trait ExPostgresProfile extends JdbcProfile with PostgresProfile with Logging {
case window.WindowFuncExpr(aggFuncExpr, partitionBy, orderBy, frameDef) =>
expr(aggFuncExpr)
b" over ("
if(partitionBy.nonEmpty) { b" partition by "; b.sep(partitionBy, ",")(expr(_, true)) }
if(partitionBy.nonEmpty) { b" partition by "; b.sep(partitionBy, ",")(expr(_, skipParens = true)) }
if(orderBy.nonEmpty) buildOrderByClause(orderBy)
frameDef.map {
frameDef.foreach {
case (mode, start, Some(end)) => b" $mode between $start and $end"
case (mode, start, None) => b" $mode $start"
}
b")"
case _ => super.expr(n, skipParens)
case _ => super.expr(n)
}
}

Expand Down

This file was deleted.

0 comments on commit 51d764b

Please sign in to comment.