深入浅出MyBatis-MapperBuilder

2015-11-21 01:31:58 · 作者: · 浏览: 2
Mapper文件里有什么
mapper配置文件是配置sql映射的地方,它看起来就像下面这个样子:

[html] view plaincopy
size="512" readOnly="true" />
userid,username,password
insert into t_user (userid,username,password) values (#{userid},#{username},#{password})
update t_user set username= #{username},
password = #{password}, where userid = #{userid}
delete from t_user where userid = #{userid}

[html] view plaincopy
[html] view plaincopy
[html] view plaincopy
[html] view plaincopy
userid,username,password [html] view plaincopy
[html] view plaincopy
[html] view plaincopy
insert into t_user (userid,username,password)
values (#{userid},#{username},#{password})
update t_user set
username = #{username}, password = #{password},
where userid = #{userid}
delete from t_user where userid = #{userid}
[html] view plaincopy
select CAST(RANDOM()*1000000 as INTEGER) a from SYSIBM.SYSDUMMY1