Skip to content

0.23.0

Compare
Choose a tag to compare
@github-actions github-actions released this 16 Jul 09:01
· 11 commits to main since this release
098a1bc

What's Changed

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.