mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -151,17 +151,16 @@ public class ResultColumn {
|
||||
return className;
|
||||
}
|
||||
|
||||
public static enum ColumnNullable {
|
||||
public enum ColumnNullable {
|
||||
NO_NULLS(ResultSetMetaData.columnNoNulls),
|
||||
NULLABLE(ResultSetMetaData.columnNullable),
|
||||
UNKNOWN(ResultSetMetaData.columnNullableUnknown);
|
||||
|
||||
final int value;
|
||||
|
||||
private ColumnNullable(final int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* ResultSetMetaData中的int值转枚举
|
||||
* @param nullable nullable值
|
||||
* @return ColumnNullable
|
||||
*/
|
||||
public static ColumnNullable of(final int nullable) {
|
||||
switch (nullable) {
|
||||
case ResultSetMetaData.columnNoNulls:
|
||||
@@ -172,5 +171,10 @@ public class ResultColumn {
|
||||
return UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
final int value;
|
||||
ColumnNullable(final int value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@ import java.util.List;
|
||||
* @since 5.7.21
|
||||
*/
|
||||
public class ConditionGroup extends Condition {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 条件列表
|
||||
*/
|
||||
|
@@ -5,7 +5,6 @@ import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -19,7 +18,7 @@ public class DerbyTest {
|
||||
private static final String DS_GROUP_NAME = "derby";
|
||||
|
||||
@BeforeClass
|
||||
public static void init() throws SQLException {
|
||||
public static void init() {
|
||||
final Db db = Db.of(DS_GROUP_NAME);
|
||||
db.execute("CREATE TABLE test(a INTEGER, b BIGINT)");
|
||||
|
||||
@@ -31,14 +30,14 @@ public class DerbyTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void queryTest() throws SQLException {
|
||||
public void queryTest() {
|
||||
final List<Entity> query = Db.of(DS_GROUP_NAME).query("select * from test");
|
||||
Assert.assertEquals(4, query.size());
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void findTest() throws SQLException {
|
||||
public void findTest() {
|
||||
final List<Entity> query = Db.of(DS_GROUP_NAME).find(Entity.of("test"));
|
||||
Assert.assertEquals(4, query.size());
|
||||
}
|
||||
|
Reference in New Issue
Block a user