Skip to content

Commit 682109c

Browse files
committed
simplify structure to facilitate submitting tests by users
1 parent aa0ff19 commit 682109c

File tree

5 files changed

+122
-0
lines changed

5 files changed

+122
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE mapper
3+
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4+
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5+
<!--
6+
Copyright 2010-2012 The myBatis Team
7+
8+
Licensed under the Apache License, Version 2.0 (the "License");
9+
you may not use this file except in compliance with the License.
10+
You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing, software
15+
distributed under the License is distributed on an "AS IS" BASIS,
16+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+
See the License for the specific language governing permissions and
18+
limitations under the License.
19+
-->
20+
21+
<!--
22+
version: $Id: UserDao.xml 4527 2012-01-03 13:58:41Z eduardo.macarron $
23+
-->
24+
<mapper namespace="org.mybatis.spring.batch.dao.UserDao">
25+
26+
<select id="getEmployee" resultType="org.mybatis.spring.batch.domain.Employee">
27+
select * from employees
28+
</select>
29+
30+
<update id="updateEmployee" parameterType="org.mybatis.spring.batch.domain.Employee">
31+
update employees set salary=#{salary} where id=#{id}
32+
</update>
33+
34+
<select id="check" resultType="int">
35+
select sum(salary) from employees
36+
</select>
37+
38+
39+
</mapper>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- Copyright 2010-2012 The myBatis Team
2+
3+
-- Licensed under the Apache License, Version 2.0 (the "License");
4+
-- you may not use this file except in compliance with the License.
5+
-- You may obtain a copy of the License at
6+
7+
-- http://www.apache.org/licenses/LICENSE-2.0
8+
9+
-- Unless required by applicable law or agreed to in writing, software
10+
-- distributed under the License is distributed on an "AS IS" BASIS,
11+
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
-- See the License for the specific language governing permissions and
13+
-- limitations under the License.
14+
15+
-- version: $Id: db.sql 2398 2010-08-29 15:16:24Z simone.tripodi $
16+
17+
create table employees (
18+
id integer not null,
19+
name varchar(80) not null,
20+
salary integer not null,
21+
constraint pk_employee primary key (id)
22+
);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- Copyright 2010-2012 The myBatis Team
2+
3+
-- Licensed under the Apache License, Version 2.0 (the "License");
4+
-- you may not use this file except in compliance with the License.
5+
-- You may obtain a copy of the License at
6+
7+
-- http://www.apache.org/licenses/LICENSE-2.0
8+
9+
-- Unless required by applicable law or agreed to in writing, software
10+
-- distributed under the License is distributed on an "AS IS" BASIS,
11+
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
-- See the License for the specific language governing permissions and
13+
-- limitations under the License.
14+
15+
-- version: $Id: db.sql 2398 2010-08-29 15:16:24Z simone.tripodi $
16+
17+
insert into employees VALUES ( 1, 'Pocoyo' , 1000);
18+
insert into employees VALUES ( 2, 'Pato' , 2000);
19+
insert into employees VALUES ( 3, 'Eli' , 3000);
20+
insert into employees VALUES ( 4, 'Valentina' , 4000);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-- Copyright 2010-2012 The myBatis Team
2+
3+
-- Licensed under the Apache License, Version 2.0 (the "License");
4+
-- you may not use this file except in compliance with the License.
5+
-- You may obtain a copy of the License at
6+
7+
-- http://www.apache.org/licenses/LICENSE-2.0
8+
9+
-- Unless required by applicable law or agreed to in writing, software
10+
-- distributed under the License is distributed on an "AS IS" BASIS,
11+
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
-- See the License for the specific language governing permissions and
13+
-- limitations under the License.
14+
15+
-- version: $Id: db.sql 2398 2010-08-29 15:16:24Z simone.tripodi $
16+
17+
create table users (
18+
id varchar(80) not null,
19+
name varchar(80) not null,
20+
constraint pk_user primary key (id)
21+
);
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- Copyright 2010-2012 The myBatis Team
2+
3+
-- Licensed under the Apache License, Version 2.0 (the "License");
4+
-- you may not use this file except in compliance with the License.
5+
-- You may obtain a copy of the License at
6+
7+
-- http://www.apache.org/licenses/LICENSE-2.0
8+
9+
-- Unless required by applicable law or agreed to in writing, software
10+
-- distributed under the License is distributed on an "AS IS" BASIS,
11+
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
-- See the License for the specific language governing permissions and
13+
-- limitations under the License.
14+
15+
-- version: $Id: db.sql 2398 2010-08-29 15:16:24Z simone.tripodi $
16+
17+
insert into users VALUES ( 'u1', 'Pocoyo' );
18+
insert into users VALUES ( 'u2', 'Pato' );
19+
insert into users VALUES ( 'u3', 'Eli' );
20+
insert into users VALUES ( 'u4', 'Valentina' );

0 commit comments

Comments
 (0)