Permalink
Browse files

Update docs to include code generator with a config URI

  • Loading branch information...
1 parent 408f2e5 commit 067c5a4dd72ba837e89186884aef0ae53eee7713 @stewSquared stewSquared committed Mar 23, 2016
Showing with 10 additions and 0 deletions.
  1. +5 −0 slick/src/sphinx/code-generation.rst
  2. +5 −0 slick/src/sphinx/code/CodeGenerator.scala
@@ -35,6 +35,10 @@ For Maven projects add the following to your ``<dependencies>``:
Slick's code generator comes with a default runner that can be used from the command line or from Java/Scala. You can simply execute
+.. includecode:: code/CodeGenerator.scala#default-runner-uri
+
+or
+
.. includecode:: code/CodeGenerator.scala#default-runner
or
@@ -43,6 +47,7 @@ or
and provide the following values
+* **uri** Config URL and/or fragment for path in typesafe config, e.g. *"(url#slick.db.default)"*
* **profile** Fully qualified name of the profile class, e.g. *"slick.jdbc.H2Profile"*
* **jdbcDriver** Fully qualified name of the JDBC driver class, e.g. *"org.h2.Driver"*
* **url** JDBC url, e.g. *"jdbc:postgresql://localhost/test"*
@@ -14,6 +14,11 @@ object CodeGenerator extends App {
val password = ""
if(false){
val db = Database.forURL("jdbc:h2:mem:test1;DB_CLOSE_DELAY=-1", driver="org.h2.Driver")
+ //#default-runner-uri
+ slick.codegen.SourceCodeGenerator.main(
+ Array(uri, outputFolder)
+ )
+ //#default-runner-uri
//#default-runner
slick.codegen.SourceCodeGenerator.main(
Array(profile, jdbcDriver, url, outputFolder, pkg)

0 comments on commit 067c5a4

Please sign in to comment.