fix pr#1023

This commit is contained in:
Looly
2023-06-19 16:03:10 +08:00
parent 7026184fa3
commit e1b6ebd1ac
3 changed files with 161 additions and 160 deletions

View File

@@ -36,7 +36,6 @@ import java.util.Set;
* ANSI SQL 方言
*
* @author loolly
*
*/
public class AnsiSqlDialect implements Dialect {
private static final long serialVersionUID = 2088101129774974580L;

View File

@@ -137,31 +137,33 @@ public class DbTest {
}
@Test
public void batchInsert() throws SQLException {
List<Entity> es = new ArrayList<>();
String tableName = "act_ge_property";
Entity e = buildEntity(tableName);
@Disabled
public void batchInsertTest() throws SQLException {
final List<Entity> es = new ArrayList<>();
final String tableName = "act_ge_property";
final Entity e = buildEntity();
es.add(e);
Db.of().tx(db -> {
db.insert(es);
List<Entity> ens = Db.of().find(e);
final List<Entity> ens = Db.of().find(e);
Assertions.assertEquals(1, ens.size());
db.del(tableName, "NAME_", "!= null");
});
}
@Test
@Disabled
public void batchInsertBatch() throws SQLException {
List<Entity> es = new ArrayList<>();
String tableName = "act_ge_property";
Entity e = buildEntity(tableName);
final List<Entity> es = new ArrayList<>();
final String tableName = "act_ge_property";
final Entity e = buildEntity();
es.add(e);
es.add(buildEntity(tableName));
es.add(buildEntity(tableName));
es.add(buildEntity(tableName));
es.add(buildEntity());
es.add(buildEntity());
es.add(buildEntity());
Db.of().tx(db -> {
db.insert(es);
List<Entity> ens = Db.of().find(e);
final List<Entity> ens = Db.of().find(e);
Assertions.assertEquals(1, ens.size());
db.del(tableName, "NAME_", "!= null");
});
@@ -169,8 +171,8 @@ public class DbTest {
}
private Entity buildEntity(String tableName) {
Entity entity = Entity.of("act_ge_property");
private Entity buildEntity() {
final Entity entity = Entity.of("act_ge_property");
entity.put("NAME_", RandomUtil.randomString(15));
entity.put("VALUE_", RandomUtil.randomString(50));
entity.put("REV_", RandomUtil.randomInt());

Binary file not shown.