Skip to content

Instantly share code, notes, and snippets.

View yadavan88's full-sized avatar

Yadu Krishnan yadavan88

View GitHub Profile
@yadavan88
yadavan88 / NamespacedCodegen.scala
Last active August 29, 2015 14:07 — forked from skinner/NamespacedCodegen.scala
The available code from @skinner was for Slick 2.0(not using scala 2.11). From scala 2.11, some of the core libraries were moved out. So the code will not work with 2.11 scala. Also, added column name customization and case class/mapping class name customization as well.
package demo
import scala.slick.jdbc.meta.{MTable, createModel}
import scala.reflect.runtime.currentMirror
import java.io.File
import java.io.FileWriter
import scala.slick.codegen.SourceCodeGenerator
import scala.slick.driver.JdbcProfile
// NamespacedCodegen handles tables within schemas by namespacing them