diff options
author | Stewart Stewart <stewinsalot@gmail.com> | 2016-09-19 15:45:55 -0400 |
---|---|---|
committer | Stewart Stewart <stewinsalot@gmail.com> | 2016-09-21 16:04:45 -0400 |
commit | 2818a4c309cf590dad621e7a03c847896d032aab (patch) | |
tree | ef8ab19bb8dffb8638648aef47a6c11b4651d16e /src/main/scala/NamespacedCodegen.scala | |
parent | 7c439d69a37b4b3621128da8316b75766225b20b (diff) | |
download | slick-codegen-plugin-2818a4c309cf590dad621e7a03c847896d032aab.tar.gz slick-codegen-plugin-2818a4c309cf590dad621e7a03c847896d032aab.tar.bz2 slick-codegen-plugin-2818a4c309cf590dad621e7a03c847896d032aab.zip |
remove dependence of rows package object
Diffstat (limited to 'src/main/scala/NamespacedCodegen.scala')
-rw-r--r-- | src/main/scala/NamespacedCodegen.scala | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/scala/NamespacedCodegen.scala b/src/main/scala/NamespacedCodegen.scala index 44826fe..c5f96e6 100644 --- a/src/main/scala/NamespacedCodegen.scala +++ b/src/main/scala/NamespacedCodegen.scala @@ -82,7 +82,7 @@ object NamespacedCodegen { // Is this compatible with ***REMOVED*** Id? How do we make it generic? def idType(t: m.Table) : String = - "Id[rows."+ t.name.schema.fold("")(_ + ".") + t.name.table.toCamelCase+"Row]" + "Id["+ t.name.schema.fold("public")(_ + ".") + t.name.table.toCamelCase+"Row]" override def code = { //imports is copied right out of @@ -91,7 +91,6 @@ object NamespacedCodegen { var imports = "import slick.model.ForeignKeyAction\n" + - "import dbmodels.rows\n" + ( if(tables.exists(_.hlistEnabled)){ "import slick.collection.heterogeneous._\n" + "import slick.collection.heterogeneous.syntax._\n" + @@ -233,12 +232,12 @@ object NamespacedCodegen { fw.write(c) fw.close() } - val disableScalariform = "// filename/ format: OFF\n" + val disableScalaStyle = "// scalastyle:off\n" val tablesSource = codegen(false).packageCode(slickDriver, pkg, "Tables", None) val rowsSource = s"package $pkg.rows\n\n" + codegen(true).code - write(disableScalariform + tablesSource, filename) - write(disableScalariform + rowsSource, typesFilename) + write(disableScalaStyle + tablesSource, filename) + write(disableScalaStyle + rowsSource, typesFilename) } } |