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

Update dependency org.mybatis.dynamic-sql:mybatis-dynamic-sql to v1.5.1 #147

Merged
merged 1 commit into from
May 4, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 1, 2024

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

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


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.

@coveralls
Copy link

Pull Request Test Coverage Report for Build #368

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.971%

Totals Coverage Status
Change from base Build #367: 0.0%
Covered Lines: 202
Relevant Lines: 217

💛 - Coveralls

@hazendaz hazendaz self-assigned this May 4, 2024
@hazendaz hazendaz merged commit de56db9 into master May 4, 2024
10 of 58 checks passed
@renovate renovate bot deleted the renovate/mybatis-dynamic-sql.version branch May 4, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants