Given the lifted/FirstExample.scala from GitHub, how would I introduce a println
that would print the generated SQL?
I have tried to add a line println(Suppliers.ddl ++ Coffees.ddl)
, but this gives me no more than the following:
scala.slick.lifted.DDL$$anon$1@acccef1
Eventually I found the answer myself.
(Suppliers.ddl ++ Coffees.ddl).createStatements.foreach(println)
More info can be found in the ScalaDoc: http://slick.typesafe.com/doc/1.0.0-RC1/api/#scala.slick.lifted.DDL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With