Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update dependency org.mybatis.dynamic-sql:mybatis-dynamic-sql to v1.5.1 #1596

Conversation

renovate-bot
Copy link
Contributor

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
org.mybatis.dynamic-sql:mybatis-dynamic-sql (source) 1.5.0 -> 1.5.1 age adoption passing confidence

Release Notes

mybatis/mybatis-dynamic-sql (org.mybatis.dynamic-sql:mybatis-dynamic-sql)

v1.5.1

This is a minor release with several enhancements.

GitHub milestone: https://github.com/mybatis/mybatis-dynamic-sql/milestone/13?closed=1

Case Expressions and Cast Function

We've added support for CASE expressions to the library. Both simple and searched case expressions are supported.
This is a fairly extensive enhancement as case expressions are quite complex, but we were able to reuse many of the
building blocks from the WHERE and HAVING support already in the library. You should be able to build CASE expressions
with relatively few limitations.

It is also common to use a CAST function with CASE expressions, so we have added CAST as a built-in function
in the library.

The DSL for both Java and Kotlin has been updated to fully support CASE expressions in the same idiomatic forms
as other parts of the library.

We've tested this extensively and the code is, of course, 100% covered by test code. But it is possible that we've not
covered every scenario. Please let us know if you find issues.

Full documentation is available here:

The pull request for this change is (#​761)

Parameter Values in Joins

We've added the ability to specify typed values in equi-joins. This allows you to avoid the use of constants, and it is
type safe. For example:

SelectStatementProvider selectStatement = select(orderLine.orderId, orderLine.quantity, itemMaster.itemId, itemMaster.description)
    .from(itemMaster, "im")
    .join(orderLine, "ol").on(orderLine.itemId, equalTo(itemMaster.itemId))
    .and(orderLine.orderId, equalTo(1))
    .build()
    .render(RenderingStrategies.MYBATIS3);

Note the phrase and(orderLine.orderId, equalTo(1)) which will be rendered with a bound SQL parameter. Currently, this
capability is limited to equality only. If you have a use for other functions (not equal, less then, greater than, etc.)
please let us know.

In order to add this capability, we've modified the join DSL to add type information to the join columns. This should
be source code compatible with most uses. There could be an issue if you are joining tables with columns of different
types - which is a rare usage. Please let us know if this causes an undo hardship.

Other Changes
  1. Rendering of conditions and columns was refactored. One benefit of this change is that
    it is now easier to support more complex functions - such as the aggregate function sum(id < 5) which is the
    initial enhancement request that inspired this change. As a result of the changes, one method is deprecated
    in the BasicColumn object. If you have implemented any custom functions, please note this deprecation and update
    your code accordingly. (#​662)
  2. Added the ability to code a bound value in rendered SQL. This is similar to a constant, but the value is added to
    the parameter map and a bind parameter marker is rendered. (#​738)
  3. Refactored the conditions to separate the concept of an empty condition from that of a renderable condition. This
    will enable a future change where conditions could decide to allow rendering even if they are considered empty (such
    as rendering empty lists). This change should be transparent to users unless they have implemented custom conditions.
  4. Added a configuration setting to allow empty list conditions to render. This could generate invalid SQL, but might be
    a good safety measure in some cases.
  5. Added Array based functions for the "in" and "not in" conditions in the Kotlin DSL. These functions allow a more
    natural use of an Array as an input for an "in" condition. They also allow easy reuse of a vararg argument in a
    function. (#​781)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate-bot renovate-bot requested review from a team as code owners May 1, 2024 19:49
@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels May 1, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label May 1, 2024
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: spanner Issues related to the googleapis/java-spanner-jdbc API. labels May 1, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 1, 2024
@olavloite olavloite merged commit f54beb2 into googleapis:main May 3, 2024
24 checks passed
@renovate-bot renovate-bot deleted the renovate/org.mybatis.dynamic-sql-mybatis-dynamic-sql-1.x branch May 3, 2024 17:24
gcf-merge-on-green bot pushed a commit that referenced this pull request May 4, 2024
🤖 I have created a release *beep* *boop*
---


## [2.18.0](https://togithub.com/googleapis/java-spanner-jdbc/compare/v2.17.1...v2.18.0) (2024-05-04)


### Features

* Allow DDL with autocommit=false ([#1600](https://togithub.com/googleapis/java-spanner-jdbc/issues/1600)) ([a61c25d](https://togithub.com/googleapis/java-spanner-jdbc/commit/a61c25d8f90460ec507b383dbaee0ca686104ba8))
* Support concurrent transactions on the emulator ([#1601](https://togithub.com/googleapis/java-spanner-jdbc/issues/1601)) ([7123991](https://togithub.com/googleapis/java-spanner-jdbc/commit/71239912a8078569dcd985314810131e593c0ed7))


### Bug Fixes

* ClassCastException in Spring Data JDBC sample ([#1595](https://togithub.com/googleapis/java-spanner-jdbc/issues/1595)) ([e96a86a](https://togithub.com/googleapis/java-spanner-jdbc/commit/e96a86a4b82ac4b47bd1ce25e810f01299597339))


### Dependencies

* Update dependency com.google.cloud:google-cloud-spanner-bom to v6.66.0 ([#1599](https://togithub.com/googleapis/java-spanner-jdbc/issues/1599)) ([84ea11a](https://togithub.com/googleapis/java-spanner-jdbc/commit/84ea11ac27635dbe6fb101134767d14488dde8c2))
* Update dependency com.google.cloud:sdk-platform-java-config to v3.30.0 ([#1597](https://togithub.com/googleapis/java-spanner-jdbc/issues/1597)) ([40a7212](https://togithub.com/googleapis/java-spanner-jdbc/commit/40a721237c79882e55d86d48402c64cc09782522))
* Update dependency org.mybatis.dynamic-sql:mybatis-dynamic-sql to v1.5.1 ([#1596](https://togithub.com/googleapis/java-spanner-jdbc/issues/1596)) ([f54beb2](https://togithub.com/googleapis/java-spanner-jdbc/commit/f54beb20d6bbe3f4974385c4758ba77d31d25ce3))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner-jdbc API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants