Releases: oyvindberg/typo
Releases · oyvindberg/typo
0.28.0
What's Changed
- Generate update set on conflict for upserts by @kaaveland in #145
New Contributors
- @kaaveland made their first contribution in #145
Full Changelog: v0.27.0...v0.28.0
0.27.0
What's Changed
- TestInsert: Don't wrap inherited ID types by @oyvindberg in #143
Full Changelog: v0.26.0...v0.27.0
0.26.0
What's Changed
- open enums by @oyvindberg in #133
- Support
GENERATED ALWAYS
(part 2) by @oyvindberg in #134
Full Changelog: v0.25.0...v0.26.0
0.25.0
What's Changed
- Escape table names in generated sql by @oyvindberg in #131
- don't write to
GENERATED ALWAYS
columns by @oyvindberg in #130 - DSL: Add spaces after column names (fixes #129) by @oyvindberg in #132
Full Changelog: v0.24.0...v0.25.0
0.24.0
What's Changed
- Support single-schema mode (Experimental, fixes #123) by @oyvindberg in #126
- Port typo module to 2.12 (Towards #52) by @oyvindberg in #127
Full Changelog: v0.23.0...v0.24.0
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.
0.22.2
Full Changelog: v0.22.1...v0.22.2
0.22.1
Full Changelog: v0.22.0...v0.22.1
0.22.0
Full Changelog: v0.21.0...v0.22.0