Skip to content

v0.3.0-beta4

Latest
Compare
Choose a tag to compare
@takapi327 takapi327 released this 20 Jun 12:51
· 165 commits to master since this release

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

⛓️ Dependency update

New Contributors

Full Changelog: v0.3.0-beta3...v0.3.0-beta4