Skip to content

Commit 45c0ded

Browse files
committed
Merge remote-tracking branch 'origin/feature/batch-insert' into feature/batch-insert
2 parents a29bda5 + d34bbee commit 45c0ded

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/test/java/org/apache/ibatis/jdbc/SQLTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,18 @@ public void batchInsertWithMultipleInsertValues(){
350350
System.out.println(sql);
351351
assertEquals("INSERT INTO TABLE_A\n (a, b)\nVALUES \n (#{a1}, #{b1}),\n (#{a2}, #{b2})", sql);
352352
}
353+
354+
@Test
355+
public void batchInsertWithMultipleInsertValues(){
356+
final String sql = new SQL() {{
357+
INSERT_INTO("TABLE_A");
358+
INTO_COLUMNS("a", "b");
359+
INTO_VALUES("#{a}");
360+
INTO_VALUES("#{b}");
361+
ADD_ROW();
362+
INTO_VALUES("#{a}");
363+
INTO_VALUES("#{b}");
364+
}}.toString();
365+
System.out.println(sql.toString());
366+
}
353367
}

0 commit comments

Comments
 (0)