MYBATIS Dynamic SQL
Dynamic SQL is a very powerful feature of MyBatis. It enables to build queries based on the scenario dynamically.
- if
- choose (when, otherwise)
- trim (where, set)
- foreach
The if Statement
This statement provides an optional text search type of functionality.
|
|
The choose, when, and otherwise Statements
a choose element, which is similar to Java’s switch statement.
|
|
The foreach Statement
foreach element allows you to specify a collection and declare item and index variables that can be used inside the body of the element
|
|
近期评论