Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update to Slick 1.0.0-RC2

  • Loading branch information...
commit 73516c5e11bc21ae58c12b018f31be05f0301d76 1 parent 540c670
@szeiger szeiger authored
View
12 build.sbt
@@ -2,17 +2,17 @@ name := "Slick-TestKit-Example"
organizationName := "Typesafe"
-organization := "com.typesafe"
+organization := "com.typesafe.slick"
-version := "1.0.0-SNAPSHOT"
+version := "1.0.0-RC2"
-scalaVersion := "2.10.0-M7"
+scalaVersion := "2.10.0"
-scalaBinaryVersion in Global := "2.10.0-M7"
+//scalaBinaryVersion in Global := "2.10.0"
libraryDependencies ++= Seq(
- "com.typesafe" %% "slick" % "1.0.0-SNAPSHOT",
- "com.typesafe" %% "slick-testkit" % "1.0.0-SNAPSHOT" % "test",
+ "com.typesafe.slick" %% "slick" % "1.0.0-RC2",
+ "com.typesafe.slick" %% "slick-testkit" % "1.0.0-RC2" % "test",
"com.novocode" % "junit-interface" % "0.10-M1" % "test",
"ch.qos.logback" % "logback-classic" % "0.9.28" % "test",
"postgresql" % "postgresql" % "9.1-901.jdbc4" % "test"
View
2  project/build.properties
@@ -1 +1 @@
-sbt.version=0.12.0
+sbt.version=0.12.2
View
15 src/main/scala/scala/slick/driver/MyPostgresDriver.scala
@@ -68,7 +68,20 @@ trait MyPostgresDriver extends ExtendedDriver { driver =>
}
class TypeMapperDelegates extends super.TypeMapperDelegates {
- override val uuidTypeMapperDelegate = new UUIDTypeMapperDelegate {
+ override val byteArrayTypeMapperDelegate = new ByteArrayTypeMapperDelegate
+ override val uuidTypeMapperDelegate = new UUIDTypeMapperDelegate
+
+ class ByteArrayTypeMapperDelegate extends super.ByteArrayTypeMapperDelegate {
+ override val sqlType = java.sql.Types.BINARY
+ override val sqlTypeName = "BYTEA"
+ override def setOption(v: Option[Array[Byte]], p: PositionedParameters) = v match {
+ case Some(a) => p.setBytes(a)
+ case None => p.setNull(sqlType)
+ }
+ }
+
+ class UUIDTypeMapperDelegate extends super.UUIDTypeMapperDelegate {
+ override def sqlTypeName = "UUID"
override def setValue(v: UUID, p: PositionedParameters) = p.setObject(v, sqlType)
override def setOption(v: Option[UUID], p: PositionedParameters) = p.setObjectOption(v, sqlType)
override def nextValue(r: PositionedResult) = r.nextObject().asInstanceOf[UUID]
Please sign in to comment.
Something went wrong with that request. Please try again.