File tree Expand file tree Collapse file tree 7 files changed +11
-7
lines changed Expand file tree Collapse file tree 7 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 15
15
SQL 形如 ` insert table(xxx) values (xxx), (xxx) ... `
16
16
17
17
- Oracle特殊批量插入
18
- ` tk.mybatis.mapper.additional.dialact .oracle.InsertListMapper `
18
+ ` tk.mybatis.mapper.additional.dialect .oracle.InsertListMapper `
19
19
20
20
SQL 形如
21
21
``` sql
26
26
SELECT 1 FROM DUAL
27
27
```
28
28
29
+ ** 由于语法限制,暂不支持序列.**
30
+
29
31
# ## UpdateByPrimaryKeySelectiveForceMapper
30
32
31
- 非空字段强制更新
33
+ 空字段强制更新
32
34
33
35
针对` UpdateByPrimaryKeySelectiveMapper` 中, 空值也需要设置的场景提供的解决方案。
34
36
Original file line number Diff line number Diff line change 22
22
* THE SOFTWARE.
23
23
*/
24
24
25
- package tk .mybatis .mapper .additional .dialact .oracle ;
25
+ package tk .mybatis .mapper .additional .dialect .oracle ;
26
26
27
27
import org .apache .ibatis .annotations .InsertProvider ;
28
28
import tk .mybatis .mapper .annotation .KeySql ;
Original file line number Diff line number Diff line change 1
- package tk .mybatis .mapper .additional .dialact .oracle ;
1
+ package tk .mybatis .mapper .additional .dialect .oracle ;
2
2
3
3
/**
4
4
* @description: Oracle独有方法
Original file line number Diff line number Diff line change 1
- package tk .mybatis .mapper .additional .dialact .oracle ;
1
+ package tk .mybatis .mapper .additional .dialect .oracle ;
2
2
3
3
import org .apache .ibatis .mapping .MappedStatement ;
4
4
import tk .mybatis .mapper .entity .EntityColumn ;
Original file line number Diff line number Diff line change 1
1
package tk .mybatis .mapper .additional .dialect .oracle ;
2
2
3
- import tk .mybatis .mapper .additional .dialact .oracle .OracleMapper ;
4
3
import tk .mybatis .mapper .common .base .BaseSelectMapper ;
5
4
6
5
/**
Original file line number Diff line number Diff line change 25
25
package tk .mybatis .mapper .additional .dialect .oracle ;
26
26
27
27
import org .apache .ibatis .session .SqlSession ;
28
+ import org .junit .Assert ;
28
29
import org .junit .Ignore ;
29
30
import org .junit .Test ;
30
31
import tk .mybatis .mapper .additional .BaseTest ;
@@ -76,7 +77,8 @@ public void testInsertList() {
76
77
countryList .add (new DemoCountry ("20" , "Zimbabwe" ,"ZW" ));
77
78
countryList .add (new DemoCountry ("21" , "Zaire" ,"ZR" ));
78
79
countryList .add (new DemoCountry ("22" , "Zambia" ,"ZM" ));
79
- mapper .insertList (countryList );
80
+ int updates = mapper .insertList (countryList );
81
+ Assert .assertEquals (3 , updates );
80
82
} finally {
81
83
//sqlSession.commit();
82
84
sqlSession .close ();
Original file line number Diff line number Diff line change 30
30
<configuration >
31
31
<settings >
32
32
<setting name =" logImpl" value =" LOG4J" />
33
+ <setting name =" jdbcTypeForNull" value =" NULL" />
33
34
</settings >
34
35
35
36
<environments default =" development" >
You can’t perform that action at this time.
0 commit comments