Skip to content

Commit 732e102

Browse files
authored
Update mill-squery docs (#5552)
Now it supports Mill v1 Pull request: #5552
1 parent 5580a4d commit 732e102

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

website/docs/modules/ROOT/pages/extending/thirdparty-plugins.adoc

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,32 +1040,27 @@ $ mill app.springBootAssembly
10401040

10411041
Source code generator for https://github.com/sake92/squery/[Squery] SQL library boilerplate.
10421042

1043-
Project home: https://github.com/sake92/squery
1043+
Project home: https://github.com/sake92/mill-squery
10441044

10451045
[source,scala,subs="attributes,verbatim"]
10461046
----
1047-
//| mvnDeps: ["ba.sake::mill-squery-generator_mill0.11:0.6.2"]
1047+
//| mvnDeps: ["ba.sake::mill-squery-generator::0.10.0"]
10481048
10491049
import mill.*
10501050
import mill.scalalib._
1051-
import ba.sake.squery.generator._
1052-
import ba.sake.squery.generator.mill.SqueryGeneratorModule
1051+
import ba.sake.mill.squery.generator.SqueryGeneratorModule
10531052
10541053
object app extends ScalaModule, SqueryGeneratorModule {
10551054
// use Task.Input(Task.ctx.env("MY_ENV_VAR")) to set sensitive variables like password etc
1056-
def squeryJdbcUrl = "jdbc:..."
1057-
def squeryUsername = ".."
1058-
def squeryPassword = ".."
1059-
def squerySchemas = Seq("myschema" -> "com.mypackage.myschema")
1060-
1061-
// override to tweak codegen settings
1062-
def squeryGeneratorConfig: T[SqueryGeneratorConfig] = ...
1055+
def squeryJdbcUrl = jdbcUrl()
1056+
def squerySchemaMappings = Seq("PUBLIC" -> "com.mypackage.myschema")
1057+
def squeryJdbcDeps = Seq(mvn"com.h2database:h2:..")
10631058
----
10641059

10651060
.Generate source files
10661061
[source,console]
10671062
----
1068-
$ ./mill root.squeryGenerate
1063+
$ ./mill app.squeryGenerate
10691064
----
10701065

10711066

0 commit comments

Comments
 (0)