diff options
author | Stewart Stewart <stewinsalot@gmail.com> | 2017-02-24 09:14:22 -0500 |
---|---|---|
committer | Stewart Stewart <stewinsalot@gmail.com> | 2017-02-24 09:14:22 -0500 |
commit | a76870feabe6b132e67c576d08dc92a15c241b8e (patch) | |
tree | e5be1b92c7da76d586afea4ec1be201dd34f1bea /src/main | |
parent | ca9dde318c7bc7b780cf5745cdee71e8430d9f6e (diff) | |
download | slick-codegen-plugin-a76870feabe6b132e67c576d08dc92a15c241b8e.tar.gz slick-codegen-plugin-a76870feabe6b132e67c576d08dc92a15c241b8e.tar.bz2 slick-codegen-plugin-a76870feabe6b132e67c576d08dc92a15c241b8e.zip |
use concrete tableGenerator
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/scala/NamespacedCodegen.scala | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main/scala/NamespacedCodegen.scala b/src/main/scala/NamespacedCodegen.scala index 05b1c35..ca32641 100644 --- a/src/main/scala/NamespacedCodegen.scala +++ b/src/main/scala/NamespacedCodegen.scala @@ -43,6 +43,7 @@ object Generator { DatabaseConfig.forURI[JdbcProfile](uri) val parsedSchemasOpt: Option[Map[String, List[String]]] = schemaNames.map(SchemaParser.parse) + val imports = schemaImports.map("import " + _).mkString("\n") try { val dbModel: Model = Await.result( @@ -64,14 +65,24 @@ object Generator { val rowGenerator = new RowSourceCodeGenerator( schemaOnlyModel, headerComment = header, - imports = schemaImports.map("import " + _).mkString("\n"), + imports = imports, schemaName = schemaName, dbModel, idType, manualForeignKeys ) - /* - val tableGenerator: TableFileGenerator = ??? + + val tableGenerator = new TableSourceCodeGenerator( + schemaOnlyModel = schemaOnlyModel, + headerComment = header, + imports = imports, + schemaName = schemaName, + fullDatabaseModel = dbModel, + pkg = pkg, + manualForeignKeys, + parentType = parentType, + idType, + typeReplacements) outputSchemaCode( schemaName = schemaName, @@ -80,7 +91,6 @@ object Generator { pkg = pkg, tableGen = tableGenerator, rowGen = rowGenerator) - */ } } finally { dc.db.close() |