Skip to content

Commit

Permalink
Slick 3.5.0-M4
Browse files Browse the repository at this point in the history
  • Loading branch information
nafg committed Jul 10, 2023
1 parent c705999 commit f6d2b86
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def mainDependencies(scalaVersion: String) = {
Seq (
"org.scala-lang.modules" %% "scala-parser-combinators" % "2.3.0",
"org.scala-lang" % "scala-reflect" % scalaVersion,
"com.typesafe.slick" %% "slick" % "3.5.0-M3",
"com.typesafe.slick" %% "slick" % "3.5.0-M4",
"org.postgresql" % "postgresql" % "42.6.0",
"org.scala-lang.modules" %% "scala-collection-compat" % "2.11.0",
"org.slf4j" % "slf4j-simple" % "2.0.7" % "provided",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ final case class AggFuncExpr(
forOrderedSet: Boolean = false
)(val buildType: Type) extends SimplyTypedNode {
type Self = AggFuncExpr
override def self: AggFuncExpr = this
override def children: ConstArray[Node] = params ++ orderBy.map(_._1) ++ ConstArray.from(filter)
override protected[this] def rebuild(ch: ConstArray[Node]): Self = {
val newAggParams = ch.slice(0, params.length)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ import slick.util.DumpInfo
* @param largeObjectId The oid of the LargeObject to stream.
* @param bufferSize The chunk size in bytes. Default to 8KB.
*/
case class LargeObjectStreamingDBIOAction(largeObjectId: Long, bufferSize: Int = 1024 * 8) extends SynchronousDatabaseAction[Array[Byte], Streaming[Array[Byte]], JdbcBackend, Effect.All] {
case class LargeObjectStreamingDBIOAction(largeObjectId: Long, bufferSize: Int = 1024 * 8)
extends SynchronousDatabaseAction[
Array[Byte],
Streaming[Array[Byte]],
JdbcBackend#Context,
JdbcBackend#StreamingContext,
Effect.All
] {

//our StreamState is the InputStream on the LargeObject instance and the number of bytes read in on the last run.
type StreamState = (InputStream, Int)

Expand Down Expand Up @@ -111,4 +119,3 @@ case class LargeObjectStreamingDBIOAction(largeObjectId: Long, bufferSize: Int =
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ final case class WindowFuncExpr(
frameDef: Option[(String, String, Option[String])] = None
) extends SimplyTypedNode {
type Self = WindowFuncExpr
override def self: WindowFuncExpr = this
protected def buildType = aggFuncExpr.nodeType
override def children: ConstArray[Node] = aggFuncExpr +: (partitionBy ++ orderBy.map(_._1))
override protected[this] def rebuild(ch: ConstArray[Node]): Self = {
Expand Down

0 comments on commit f6d2b86

Please sign in to comment.