mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
sql parser refactor
This commit is contained in:
@@ -8,6 +8,7 @@ import junit.framework.Assert;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.alibaba.druid.mock.MockDriver;
|
||||
import com.alibaba.druid.mock.MockPreparedStatement;
|
||||
import com.alibaba.druid.mock.MockStatement;
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.stat.DruidDataSourceStatManager;
|
||||
@@ -68,7 +69,7 @@ public class Bug_for_happyday517 extends TestCase {
|
||||
String sql = "select 1";
|
||||
Statement stmt = conn.prepareStatement(sql, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
|
||||
|
||||
MockStatement mockStmt = stmt.unwrap(MockStatement.class);
|
||||
MockPreparedStatement mockStmt = stmt.unwrap(MockPreparedStatement.class);
|
||||
|
||||
Assert.assertEquals(ResultSet.TYPE_SCROLL_SENSITIVE, mockStmt.getResultSetType());
|
||||
Assert.assertEquals(ResultSet.CONCUR_UPDATABLE, mockStmt.getResultSetConcurrency());
|
||||
@@ -85,7 +86,7 @@ public class Bug_for_happyday517 extends TestCase {
|
||||
Statement stmt = conn.prepareStatement(sql, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE,
|
||||
ResultSet.CLOSE_CURSORS_AT_COMMIT);
|
||||
|
||||
MockStatement mockStmt = stmt.unwrap(MockStatement.class);
|
||||
MockPreparedStatement mockStmt = stmt.unwrap(MockPreparedStatement.class);
|
||||
|
||||
Assert.assertEquals(ResultSet.TYPE_SCROLL_SENSITIVE, mockStmt.getResultSetType());
|
||||
Assert.assertEquals(ResultSet.CONCUR_UPDATABLE, mockStmt.getResultSetConcurrency());
|
||||
@@ -102,7 +103,7 @@ public class Bug_for_happyday517 extends TestCase {
|
||||
String sql = "select 1";
|
||||
Statement stmt = conn.prepareCall(sql, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
|
||||
|
||||
MockStatement mockStmt = stmt.unwrap(MockStatement.class);
|
||||
Statement mockStmt = stmt.unwrap(Statement.class);
|
||||
|
||||
Assert.assertEquals(ResultSet.TYPE_SCROLL_SENSITIVE, mockStmt.getResultSetType());
|
||||
Assert.assertEquals(ResultSet.CONCUR_UPDATABLE, mockStmt.getResultSetConcurrency());
|
||||
@@ -119,7 +120,7 @@ public class Bug_for_happyday517 extends TestCase {
|
||||
Statement stmt = conn.prepareCall(sql, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE,
|
||||
ResultSet.CLOSE_CURSORS_AT_COMMIT);
|
||||
|
||||
MockStatement mockStmt = stmt.unwrap(MockStatement.class);
|
||||
Statement mockStmt = stmt.unwrap(Statement.class);
|
||||
|
||||
Assert.assertEquals(ResultSet.TYPE_SCROLL_SENSITIVE, mockStmt.getResultSetType());
|
||||
Assert.assertEquals(ResultSet.CONCUR_UPDATABLE, mockStmt.getResultSetConcurrency());
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.alibaba.druid.sql.ast.SQLStatement;
|
||||
import com.alibaba.druid.sql.dialect.hive.parser.HiveStatementParser;
|
||||
import com.alibaba.druid.sql.dialect.hive.visitor.HiveSchemaStatVisitor;
|
||||
import com.alibaba.druid.sql.hive.HiveTest;
|
||||
import com.alibaba.druid.stat.TableStat;
|
||||
|
||||
public class HiveShowTableTest extends HiveTest {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user