Skip to content

Commit

Permalink
enhance codegen example according to #325
Browse files Browse the repository at this point in the history
  • Loading branch information
tminglei committed Jan 25, 2017
1 parent 2acb34a commit fad3c2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/codegen-customization/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ lazy val sharedSettings = Seq(
libraryDependencies ++= List(
"com.typesafe.slick" %% "slick" % "3.1.1",
"org.postgresql" % "postgresql" % "9.4-1201-jdbc41",
"com.github.tminglei" %% "slick-pg" % "0.14.1",
"com.github.tminglei" %% "slick-pg_play-json" % "0.14.1",
"com.github.tminglei" %% "slick-pg_joda-time" % "0.14.1",
"com.github.tminglei" %% "slick-pg_jts" % "0.14.1",
"com.github.tminglei" %% "slick-pg" % "0.14.5",
"com.github.tminglei" %% "slick-pg_play-json" % "0.14.5",
"com.github.tminglei" %% "slick-pg_joda-time" % "0.14.5",
"com.github.tminglei" %% "slick-pg_jts" % "0.14.5",
"joda-time" % "joda-time" % "2.4",
"org.joda" % "joda-convert" % "1.7",
"com.vividsolutions" % "jts" % "1.13",
Expand Down
2 changes: 2 additions & 0 deletions examples/codegen-customization/src/main/scala/Example.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ object Example extends App {
val q = Supplier.join(Coffee).on(_.id === _.supId)
.map{ case (s,c) => (s.name, c.name) }

println(">>> running Example ...")

Await.ready(
db.run {
q.result.map(
Expand Down
1 change: 1 addition & 0 deletions examples/codegen-customization/src/sql/create-tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ create table COFFEE
PRICE numeric(10,2) NOT NULL,
SALES integer NOT NULL,
TOTAL integer NOT NULL,
arrofbyteproblem bytea not null,
PRIMARY KEY (NAME),
FOREIGN KEY (SUP_ID) REFERENCES SUPPLIER (ID));

Expand Down

0 comments on commit fad3c2b

Please sign in to comment.