add h2 support

This commit is contained in:
wenshao
2012-07-09 08:48:23 +08:00
parent c1d304bf2e
commit 81533cfd0e
6 changed files with 84 additions and 32 deletions
@@ -102,7 +102,6 @@ public class MySqlMockExecuteHandlerImpl implements MockExecuteHandler {
return rs;
}
@SuppressWarnings("resource")
public ResultSet executeQueryFromDual(MockStatement statement, SQLSelectQueryBlock query) throws SQLException {
MockResultSet rs = new MockResultSet(statement);
MockResultSetMetaData metaData = rs.getMockMetaData();
@@ -62,10 +62,12 @@ public final class JdbcUtils {
public static final String MYSQL = "mysql";
public static final String DERBY = "derby";
public static final String HBASE = "hbase";
public static final String HIVE = "hive";
public static final String HIVE = "hive";
public static final String H2 = "h2";
private final static Log LOG = LogFactory.getLog(JdbcUtils.class);
@@ -445,7 +447,7 @@ public final class JdbcUtils {
} else if (rawUrl.startsWith("jdbc:ingres:")) {
return "ingres";
} else if (rawUrl.startsWith("jdbc:h2:")) {
return "h2";
return H2;
} else if (rawUrl.startsWith("jdbc:mckoi:")) {
return "mckoi";
} else if (rawUrl.startsWith("jdbc:cloudscape:")) {