0.23.0
What's Changed
- Parallelize database handling (breaking, fixes #49) by @oyvindberg in #119
- Allow customizing name of primary key type based on rows by @oyvindberg in #121
- downgrade to scala 3.3 (fixes #87) by @oyvindberg in #122
- Simple
generateFromDb
overload dropped test scope. (breaking, fixes #118) by @oyvindberg in #120 - Add
upsertStreaming
andupsertBatch
(fix #115) by @oyvindberg in #117
Full Changelog: v0.22.2...v0.23.0
Breaking changes
Need to overwriteFolder
multiple source directories
generateFromDb(
ds,
options,
targetFolder = targetDir,
testTargetFolder = Some(testTargetDir),
selector = selector,
scriptsPaths = List(scriptsFolder)
-).overwriteFolder()
+).foreach(_.overwriteFolder())
// add changed files to git, so you can keep them under control
//scala.sys.process.Process(List("git", "add", targetDir.toString)).!!
need to provide a TypoDataSource
instead of a java.sql.Connection
// adapt to your instance and credentials
-implicit val c: java.sql.Connection =
- java.sql.DriverManager.getConnection("jdbc:postgresql://localhost:6432/postgres?user=postgres&password=password")
+val ds = TypoDataSource.hikari(
+ server = "localhost",
+ port = 6432,
+ databaseName = "Adventureworks",
+ username = "postgres",
+ password = "password"
+)
val options = Options(
// customize package name for generated code
@@ -67,6 +72,7 @@
val selector = Selector.ExcludePostgresInternal
generateFromDb(
+ ds,
options,
targetFolder = targetDir,
testTargetFolder = Some(testTargetDir),
customization of Id type names
Signature of typo.Naming#idName
changed so you also get a representation of all columns in the ID type, which can help you name it.