功能 | 标签名称 |
---|---|
定义sql语句 | insert delete update select |
配置java对象属性与查询结果集中列名对应关系 | resultMap |
控制动态SQL拼接 | foreach if choose |
格式化输出 | where set trim |
配置关联关系 | collection association |
定义常量 | sql |
引用常量 | include |
<resultMap type="" id="">
<id column="" property=""/>
<result column="" property=""/>
<collection property="" resultMap="">
</resultMap>
<trim prefix="where" prefixOverides="and"></trim>
<set></set>
等价于<trim prefix="set" suffixOverrides=","></trim>
<where>
<if test="command!=null and !""equals(command.trim())">
and command=#{command}
</if>
</where>
<where>
<choose>
<when test=""></when>
<when test=""></when>
<when test=""></when>
</choose>
</where>
网友评论