mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
@@ -33,6 +33,6 @@ public class BigOrTest extends TestCase {
|
||||
String sql = buf.toString();
|
||||
List<SQLStatement> stmtList = SQLUtils.parseStatements(sql, null);
|
||||
String text = SQLUtils.toSQLString(stmtList.get(0));
|
||||
System.out.println(text);
|
||||
//System.out.println(text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,17 +35,17 @@ public class DB2SelectTest_8 extends DB2Test {
|
||||
DB2StatementParser parser = new DB2StatementParser(sql);
|
||||
List<SQLStatement> statementList = parser.parseStatementList();
|
||||
SQLStatement stmt = statementList.get(0);
|
||||
print(statementList);
|
||||
// print(statementList);
|
||||
|
||||
Assert.assertEquals(1, statementList.size());
|
||||
|
||||
DB2SchemaStatVisitor visitor = new DB2SchemaStatVisitor();
|
||||
stmt.accept(visitor);
|
||||
|
||||
System.out.println("Tables : " + visitor.getTables());
|
||||
System.out.println("fields : " + visitor.getColumns());
|
||||
System.out.println("coditions : " + visitor.getConditions());
|
||||
System.out.println("orderBy : " + visitor.getOrderByColumns());
|
||||
// System.out.println("Tables : " + visitor.getTables());
|
||||
// System.out.println("fields : " + visitor.getColumns());
|
||||
// System.out.println("coditions : " + visitor.getConditions());
|
||||
// System.out.println("orderBy : " + visitor.getOrderByColumns());
|
||||
|
||||
Assert.assertEquals(1, visitor.getTables().size());
|
||||
Assert.assertEquals(1, visitor.getColumns().size());
|
||||
|
||||
@@ -51,7 +51,7 @@ public class MySqlParserResourceTest extends TestCase {
|
||||
}
|
||||
|
||||
public void exec_test(String resource) throws Exception {
|
||||
System.out.println(resource);
|
||||
// System.out.println(resource);
|
||||
InputStream is = null;
|
||||
|
||||
is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
|
||||
@@ -68,8 +68,8 @@ public class MySqlParserResourceTest extends TestCase {
|
||||
Assert.assertEquals(1, statementList.size());
|
||||
|
||||
String text = output(statementList);
|
||||
System.out.println(text);
|
||||
System.out.println();
|
||||
// System.out.println(text);
|
||||
// System.out.println();
|
||||
|
||||
expect = expect.replaceAll("\\r\\n", "\n");
|
||||
Assert.assertEquals("errror resource " + resource, expect, text.trim());
|
||||
@@ -95,7 +95,8 @@ public class MySqlParserResourceTest extends TestCase {
|
||||
MySqlParameterizedOutputVisitor visitor = new MySqlParameterizedOutputVisitor(out);
|
||||
statemen.accept(visitor);
|
||||
|
||||
System.out.println(out.toString());
|
||||
out.toString();
|
||||
// System.out.println(out.toString());
|
||||
|
||||
expect = expect.replaceAll("\\r\\n", "\n");
|
||||
Assert.assertEquals(expect, out.toString());
|
||||
|
||||
@@ -52,7 +52,7 @@ public class MySqlResourceTest extends TestCase {
|
||||
}
|
||||
|
||||
public void exec_test(String resource) throws Exception {
|
||||
System.out.println(resource);
|
||||
// System.out.println(resource);
|
||||
InputStream is = null;
|
||||
|
||||
is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
|
||||
@@ -72,12 +72,12 @@ public class MySqlResourceTest extends TestCase {
|
||||
MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
|
||||
statemen.accept(visitor);
|
||||
|
||||
System.out.println(sql);
|
||||
System.out.println("Tables : " + visitor.getTables());
|
||||
System.out.println("fields : " + visitor.getColumns());
|
||||
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
// System.out.println(sql);
|
||||
// System.out.println("Tables : " + visitor.getTables());
|
||||
// System.out.println("fields : " + visitor.getColumns());
|
||||
//
|
||||
// System.out.println();
|
||||
// System.out.println();
|
||||
}
|
||||
|
||||
void mergValidate(String sql, String expect) {
|
||||
|
||||
Reference in New Issue
Block a user