mysql update mapper_Mybatis 文档篇 3.2:Mapper XML 之 insert, update and delete

2 insert, update and delete

2.1 insert, update 和 delete 的属性

The data modification statements insert, update and delete are very similar in their implementation:

数据变更语句 insert、update 和 delete 是很相似的:

id="insertAuthor"

parameterType="domain.blog.Author"

flushCache="true"

statementType="PREPARED"

keyProperty=""

keyColumn=""

useGeneratedKeys=""

timeout="20">

id="updateAuthor"

parameterType="domain.blog.Author"

flushCache="true"

statementType="PREPARED"

timeout="20">

id="deleteAuthor"

parameterType="domain.blog.Author"

flushCache="true"

statementType="PREPARED"

timeout="20">

id

A unique identifier in this namespace that can be used to reference this statement.

该命名空间可以被用来引用该语句的的唯一标识。

parameterType

The fully qualified class name or alias for the parameter that will be passed into this statement. This attribute is optional because MyBatis can calculate the TypeHandler to use out of the actual parameter passed to the statement. Default is unset.

传入这条语句的参数的完全限定类名或别名。这个属性是可选的,因为MyBatis 可以自己推断出传入这条语句的实参对应的 TypeHandler。默认未设置。

parameterMap

This is a deprecated approach to referencing an external parameterMap. Use inline parameter mappings and the parameterType attribute.

已废弃,用来指向外部的 parameterMap。使用行内参数映射和 parameterType 属性。

flushCache

Setting this to true will cause the 2nd level and local caches to be flushed whenever this statement is called. Default: true for insert, update and delete statements.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值