MyBatis dynamic SQL Version 1.1.3
jeffgbutler
released this
16 Sep 14:49
·
1983 commits
to master
since this release
This release has three major enhancements:
- Added support for multiple row inserts. This allows you to insert multiple rows in a single statement, rather than having to code a batch. This is useful for a small number of rows, but we still recommend using a batch for a large number of rows. Note that multiple row inserts will not render properly for Spring so they are supported with MyBatis only.
- Added utility functions and other changes to allow wider use of lambdas for completing SQL statements. This is particularly noticeable with WHERE clauses - WHERE clauses can now be supplied via lambda rather than by method chaining. Ultimately this will simplify and standardize the code created by MyBatis Generator, but it has benefits in all use cases. As a result of this change, several older methods have been deprecated and will be removed in a future release. There is a corresponding change soon to be released in MyBatis Generator.
- Kotlin Support! Another benefit of more fully embracing lambdas is that the new usage patterns start to look a bit more like Kotlin. So we have added a Kotlin DSL and extension methods for both MyBatis and Spring runtimes. This should be considered an initial phase of Kotlin support - there is probably more to come. We would appreciate any feedback from Kotlin users regarding this DSL and what future Kotlin support should look like.
For information about the new lambda based usage pattern, see this page: https://mybatis.org/mybatis-dynamic-sql/docs/mybatis3.html
For information about Kotlin support when using MyBatis, see this page: https://mybatis.org/mybatis-dynamic-sql/docs/kotlinMyBatis3.html
For information about Kotlin support when using Spring JDBC Template, see this page: https://mybatis.org/mybatis-dynamic-sql/docs/kotlinSpring.html
The full list of changes can be viewed here:
https://github.com/mybatis/mybatis-dynamic-sql/issues?q=is%3Aclosed+milestone%3A1.1.3
All artifacts are available in Maven central under these coordinates:
<dependency>
<groupId>org.mybatis.dynamic-sql</groupId>
<artifactId>mybatis-dynamic-sql</artifactId>
<version>1.1.3</version>
</dependency>