ldbc v0.3.0-beta4 is released.
This release adds enhancements to existing features.
Note
ldbc is pre-1.0 software and is still undergoing active development. New versions are not binary compatible with prior versions, although in most cases user code will be source compatible.
The major version will be the stable version.
Functional modification: extension of plain query construction.
The determination of the type retrieved by the database connection method using a plain query used to specify the type to be retrieved and its format (List or Option) collectively.
This modification changed that and made the internal logic common by separating the type to be retrieved from the specification of its format. This makes the plain query syntax more similar to doobie, so users of doobie should be able to use it without confusion.
before
sql"SELECT id, name, age FROM user".toList[(Long, String, Int)].readOnly(connection)
sql"SELECT id, name, age FROM user WHERE id = ${1L}".headOption[User].readOnly(connection)
after
sql"SELECT id, name, age FROM user".query[(Long, String, Int)].to[List].readOnly(connection)
sql"SELECT id, name, age FROM user WHERE id = ${1L}".query[User].to[Option].readOnly(connection)
Dependency changes (Broken change)
Caution
This change is not compatible with previous versions. It constitutes a disruptive change.
Previously, ldbc-query-builder was included in ldbc-dsl. However, with this update, if you want to use the Query Builder, you need to set up an additional dependency on ldbc-query-builder.
libraryDependencies += "io.github.takapi327" %% "ldbc-query-builder" % "0.3.0-beta4"
What's Changed
🔧 Refactoring
- Refacor/2024 06 parameter redesign by @takapi327 in #227
- Refactor/2024 06 functional modification of sql by @takapi327 in #230
- Refactor/2024 06 separate query builder by @takapi327 in #232
- Replace
cats.implicits.*
withcats.syntax.all.*
by @okoeee in #236
⛓️ Dependency update
- Update otel4s-core-trace from 0.7.0 to 0.8.0 by @scala-steward in #226
- Update scalatest from 3.2.17 to 3.2.18 by @scala-steward in #233
- Update scalafmt-core from 3.8.1 to 3.8.2 by @scala-steward in #237
New Contributors
Full Changelog: v0.3.0-beta3...v0.3.0-beta4