1、定義sql陳述句
- 增:<insert>
- 刪:<delete>
- 改:<update>
- 查:<select>
其中select最復雜,共有id、parameterType屬性,此外select還有resultType、ResultMap
2、sql標簽
- 定義通用的sql陳述句,以便sql引入:<sql>
- 引入<sql>:<include>
3、resultMap中的標簽
- 實作列與物體屬性的映射:<resultMap>
- 多對多:<collection>
- 一對一:<association>
4、動態sql標簽
- 單條件:<if>
- 多條件:<choose>
- <when>
- <otherwise>
- 用來處理sql連接:<trim>
- 處理where條件:<where>
- 更新陳述句:<set>
- 回圈陳述句,在in里面使用:<foreach>
- 定義背景關系變數:<bind>
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/238118.html
標籤:其他
