✎
编程开发网
首页
C语言
C++
面试
Linux
函数
Windows
数据库
下载
搜索
当前位置:
首页
->
AI编程基础
->
数据库编程
深入浅出MyBatis-MapperBuilder
2015-11-21 01:31:58
·
作者:
·
浏览:
2
标签:
深入浅出
MyBatis-MapperBuilder
Mapper文件里有什么
mapper配置文件是配置sql映射的地方,它看起来就像下面这个样子:
[
html
]
view plaincopy
size="512" readOnly="true" />
userid,username,password
useCache="false"> select
from t_user t where t.username = #{username}
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
select
from t_user t where t.username = #{username}
[html]
view plaincopy
select
from t_user t where t.username = #{username}
[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