forked from tototoshi/sbt-slick-codegen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23c5db0
commit 64b9f01
Showing
8 changed files
with
20 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.3") | ||
//addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.18") | ||
//addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") | ||
addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.0.1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
|
||
crossScalaVersions := Seq("2.12.15", "2.13.8") | ||
|
||
Global / onChangedBuildSource := ReloadOnSourceChanges | ||
|
||
libraryDependencies += "com.typesafe.slick" %% "slick" % System.getProperty("slick.version") | ||
|
||
enablePlugins(CodegenPlugin) | ||
|
||
Compile / sourceGenerators += slickCodegen | ||
|
||
slickCodegenDatabaseUrl := "jdbc:postgresql://postgres/example" | ||
|
||
slickCodegenDatabaseUser := "test" | ||
|
||
slickCodegenDatabasePassword := "test" | ||
slickCodegenOutputContainer := "Table" | ||
slickCodegenOutputPackage := "com.demo" | ||
//) | ||
|
||
slickCodegenOutputToMultipleFiles := true | ||
codeGen("etl")( | ||
slickCodegenOutputContainer := "Etl", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
$ exec psql -c 'create table if not exists users (id bigint primary key, name varchar(256));' -U test -h postgres example | ||
> + compile | ||
> + slickCodegenAll | ||
|
||
$ exists target/scala-2.13/src_managed/main/com/example/Tables.scala | ||
$ exists target/scala-2.13/src_managed/main/com/example/UsersTable.scala | ||
$ exists src/main/scala/com/demo/Table.scala | ||
$ exists src/main/scala/com/example/Etl.scala |