While using Slick 3.0.3 and in the context of trying to solve this question how-to-use-slick-code-generator-to-include-database-views-as-well I get as far as this:
import slick.dbio.DBIO
import slick.model.Model
import slick.driver.PostgresDriver
import slick.jdbc.meta.MTable
import slick.codegen.SourceCodeGenerator
val model : DBIO[Model] = PostgresDriver.createModel(Some(MTable.getTables(None, None, None, Some(Seq("table1","table2","view1")))))
// SourceCodeGenerator requires a Model and not a DBIO[Model]
val codegen = new SourceCodeGenerator(model)
It looks almost there, however PostgresDriver.createModel
returns a DBIO[Model]
and not a Model
and I don't see how to extract the model or for that matter run the generator with such model reference. What's this DBIO anyway?