MyBatis笔记(2)-动态SQL
if
1 | <select id="findActiveBlogWithTitleLike" |
1 | <select id="findActiveBlogLike" |
choose, when, otherwise
1 | <select id="findActiveBlogLike" |
trim, where, set
- select
1 | <select id="findActiveBlogLike" |
1 | <trim prefix="WHERE" prefixOverrides="AND |OR "> |
- update
1 | <update id="updateAuthorIfNecessary"> |
1 | <trim prefix="SET" suffixOverrides=","> |
foreach
1 | <select id="selectPostIn" resultType="domain.blog.Post"> |
bind
1 | <select id="selectBlogsLike" resultType="Blog"> |
多数据库支持
1 | <insert id="insert"> |
插件式脚本语言(Pluggable Scripting Languages)
- TODO